var $s = Object.defineProperty;
var Bs = (f, t, n) => t in f ? $s(f, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : f[t] = n;
var Di = (f, t, n) => (Bs(f, typeof t != "symbol" ? t + "" : t, n), n), io = (f, t, n) => {
  if (!t.has(f))
    throw TypeError("Cannot " + n);
};
var _n = (f, t, n) => (io(f, t, "read from private field"), n ? n.call(f) : t.get(f)), Pn = (f, t, n) => {
  if (t.has(f))
    throw TypeError("Cannot add the same private member more than once");
  t instanceof WeakSet ? t.add(f) : t.set(f, n);
}, yn = (f, t, n, r) => (io(f, t, "write to private field"), r ? r.call(f, n) : t.set(f, n), n);
class Polyfill {
  static install() {
    Object.setPrototypeOf = Object.setPrototypeOf || function(t, n) {
      return t.__proto__ = n, t;
    }, Object.assign = Object.assign || function(t) {
      if (t == null)
        throw new TypeError("Cannot convert undefined or null to object");
      let n = Object(t);
      for (let r = 1; r < arguments.length; r++) {
        let l = arguments[r];
        if (l != null)
          for (let a in l)
            l.hasOwnProperty(a) && (n[a] = l[a]);
      }
      return n;
    };
  }
}
Polyfill.install();
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function getDefaultExportFromCjs(f) {
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
}
var events = { exports: {} }, R = typeof Reflect == "object" ? Reflect : null, ReflectApply = R && typeof R.apply == "function" ? R.apply : function(t, n, r) {
  return Function.prototype.apply.call(t, n, r);
}, ReflectOwnKeys;
R && typeof R.ownKeys == "function" ? ReflectOwnKeys = R.ownKeys : Object.getOwnPropertySymbols ? ReflectOwnKeys = function(t) {
  return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
} : ReflectOwnKeys = function(t) {
  return Object.getOwnPropertyNames(t);
};
function ProcessEmitWarning(f) {
  console && console.warn && console.warn(f);
}
var NumberIsNaN = Number.isNaN || function(t) {
  return t !== t;
};
function EventEmitter() {
  EventEmitter.init.call(this);
}
events.exports = EventEmitter;
events.exports.once = once;
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = void 0;
EventEmitter.prototype._eventsCount = 0;
EventEmitter.prototype._maxListeners = void 0;
var defaultMaxListeners = 10;
function checkListener(f) {
  if (typeof f != "function")
    throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof f);
}
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
  enumerable: !0,
  get: function() {
    return defaultMaxListeners;
  },
  set: function(f) {
    if (typeof f != "number" || f < 0 || NumberIsNaN(f))
      throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + f + ".");
    defaultMaxListeners = f;
  }
});
EventEmitter.init = function() {
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
};
EventEmitter.prototype.setMaxListeners = function(t) {
  if (typeof t != "number" || t < 0 || NumberIsNaN(t))
    throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
  return this._maxListeners = t, this;
};
function _getMaxListeners(f) {
  return f._maxListeners === void 0 ? EventEmitter.defaultMaxListeners : f._maxListeners;
}
EventEmitter.prototype.getMaxListeners = function() {
  return _getMaxListeners(this);
};
EventEmitter.prototype.emit = function(t) {
  for (var n = [], r = 1; r < arguments.length; r++)
    n.push(arguments[r]);
  var l = t === "error", a = this._events;
  if (a !== void 0)
    l = l && a.error === void 0;
  else if (!l)
    return !1;
  if (l) {
    var e;
    if (n.length > 0 && (e = n[0]), e instanceof Error)
      throw e;
    var g = new Error("Unhandled error." + (e ? " (" + e.message + ")" : ""));
    throw g.context = e, g;
  }
  var _ = a[t];
  if (_ === void 0)
    return !1;
  if (typeof _ == "function")
    ReflectApply(_, this, n);
  else
    for (var y = _.length, x = arrayClone(_, y), r = 0; r < y; ++r)
      ReflectApply(x[r], this, n);
  return !0;
};
function _addListener(f, t, n, r) {
  var l, a, e;
  if (checkListener(n), a = f._events, a === void 0 ? (a = f._events = /* @__PURE__ */ Object.create(null), f._eventsCount = 0) : (a.newListener !== void 0 && (f.emit(
    "newListener",
    t,
    n.listener ? n.listener : n
  ), a = f._events), e = a[t]), e === void 0)
    e = a[t] = n, ++f._eventsCount;
  else if (typeof e == "function" ? e = a[t] = r ? [n, e] : [e, n] : r ? e.unshift(n) : e.push(n), l = _getMaxListeners(f), l > 0 && e.length > l && !e.warned) {
    e.warned = !0;
    var g = new Error("Possible EventEmitter memory leak detected. " + e.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
    g.name = "MaxListenersExceededWarning", g.emitter = f, g.type = t, g.count = e.length, ProcessEmitWarning(g);
  }
  return f;
}
EventEmitter.prototype.addListener = function(t, n) {
  return _addListener(this, t, n, !1);
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.prependListener = function(t, n) {
  return _addListener(this, t, n, !0);
};
function onceWrapper() {
  if (!this.fired)
    return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
}
function _onceWrap(f, t, n) {
  var r = { fired: !1, wrapFn: void 0, target: f, type: t, listener: n }, l = onceWrapper.bind(r);
  return l.listener = n, r.wrapFn = l, l;
}
EventEmitter.prototype.once = function(t, n) {
  return checkListener(n), this.on(t, _onceWrap(this, t, n)), this;
};
EventEmitter.prototype.prependOnceListener = function(t, n) {
  return checkListener(n), this.prependListener(t, _onceWrap(this, t, n)), this;
};
EventEmitter.prototype.removeListener = function(t, n) {
  var r, l, a, e, g;
  if (checkListener(n), l = this._events, l === void 0)
    return this;
  if (r = l[t], r === void 0)
    return this;
  if (r === n || r.listener === n)
    --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete l[t], l.removeListener && this.emit("removeListener", t, r.listener || n));
  else if (typeof r != "function") {
    for (a = -1, e = r.length - 1; e >= 0; e--)
      if (r[e] === n || r[e].listener === n) {
        g = r[e].listener, a = e;
        break;
      }
    if (a < 0)
      return this;
    a === 0 ? r.shift() : spliceOne(r, a), r.length === 1 && (l[t] = r[0]), l.removeListener !== void 0 && this.emit("removeListener", t, g || n);
  }
  return this;
};
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.removeAllListeners = function(t) {
  var n, r, l;
  if (r = this._events, r === void 0)
    return this;
  if (r.removeListener === void 0)
    return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : r[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete r[t]), this;
  if (arguments.length === 0) {
    var a = Object.keys(r), e;
    for (l = 0; l < a.length; ++l)
      e = a[l], e !== "removeListener" && this.removeAllListeners(e);
    return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
  }
  if (n = r[t], typeof n == "function")
    this.removeListener(t, n);
  else if (n !== void 0)
    for (l = n.length - 1; l >= 0; l--)
      this.removeListener(t, n[l]);
  return this;
};
function _listeners(f, t, n) {
  var r = f._events;
  if (r === void 0)
    return [];
  var l = r[t];
  return l === void 0 ? [] : typeof l == "function" ? n ? [l.listener || l] : [l] : n ? unwrapListeners(l) : arrayClone(l, l.length);
}
EventEmitter.prototype.listeners = function(t) {
  return _listeners(this, t, !0);
};
EventEmitter.prototype.rawListeners = function(t) {
  return _listeners(this, t, !1);
};
EventEmitter.listenerCount = function(f, t) {
  return typeof f.listenerCount == "function" ? f.listenerCount(t) : listenerCount.call(f, t);
};
EventEmitter.prototype.listenerCount = listenerCount;
function listenerCount(f) {
  var t = this._events;
  if (t !== void 0) {
    var n = t[f];
    if (typeof n == "function")
      return 1;
    if (n !== void 0)
      return n.length;
  }
  return 0;
}
EventEmitter.prototype.eventNames = function() {
  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
};
function arrayClone(f, t) {
  for (var n = new Array(t), r = 0; r < t; ++r)
    n[r] = f[r];
  return n;
}
function spliceOne(f, t) {
  for (; t + 1 < f.length; t++)
    f[t] = f[t + 1];
  f.pop();
}
function unwrapListeners(f) {
  for (var t = new Array(f.length), n = 0; n < t.length; ++n)
    t[n] = f[n].listener || f[n];
  return t;
}
function once(f, t) {
  return new Promise(function(n, r) {
    function l(e) {
      f.removeListener(t, a), r(e);
    }
    function a() {
      typeof f.removeListener == "function" && f.removeListener("error", l), n([].slice.call(arguments));
    }
    eventTargetAgnosticAddListener(f, t, a, { once: !0 }), t !== "error" && addErrorHandlerIfEventEmitter(f, l, { once: !0 });
  });
}
function addErrorHandlerIfEventEmitter(f, t, n) {
  typeof f.on == "function" && eventTargetAgnosticAddListener(f, "error", t, n);
}
function eventTargetAgnosticAddListener(f, t, n, r) {
  if (typeof f.on == "function")
    r.once ? f.once(t, n) : f.on(t, n);
  else if (typeof f.addEventListener == "function")
    f.addEventListener(t, function l(a) {
      r.once && f.removeEventListener(t, l), n(a);
    });
  else
    throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof f);
}
var eventsExports = events.exports;
const EventEmitter$1 = /* @__PURE__ */ getDefaultExportFromCjs(eventsExports);
class Log {
  static e(t, n) {
    (!t || Log.FORCE_GLOBAL_TAG) && (t = Log.GLOBAL_TAG);
    let r = `[${t}] > ${n}`;
    Log.ENABLE_CALLBACK && Log.emitter.emit("log", "error", r), Log.ENABLE_ERROR && (console.error ? console.error(r) : console.warn ? console.warn(r) : console.log(r));
  }
  static i(t, n) {
    (!t || Log.FORCE_GLOBAL_TAG) && (t = Log.GLOBAL_TAG);
    let r = `[${t}] > ${n}`;
    Log.ENABLE_CALLBACK && Log.emitter.emit("log", "info", r), Log.ENABLE_INFO && (console.info ? console.info(r) : console.log(r));
  }
  static w(t, n) {
    (!t || Log.FORCE_GLOBAL_TAG) && (t = Log.GLOBAL_TAG);
    let r = `[${t}] > ${n}`;
    Log.ENABLE_CALLBACK && Log.emitter.emit("log", "warn", r), Log.ENABLE_WARN && (console.warn ? console.warn(r) : console.log(r));
  }
  static d(t, n) {
    (!t || Log.FORCE_GLOBAL_TAG) && (t = Log.GLOBAL_TAG);
    let r = `[${t}] > ${n}`;
    Log.ENABLE_CALLBACK && Log.emitter.emit("log", "debug", r), Log.ENABLE_DEBUG && (console.debug ? console.debug(r) : console.log(r));
  }
  static v(t, n) {
    (!t || Log.FORCE_GLOBAL_TAG) && (t = Log.GLOBAL_TAG);
    let r = `[${t}] > ${n}`;
    Log.ENABLE_CALLBACK && Log.emitter.emit("log", "verbose", r), Log.ENABLE_VERBOSE;
  }
}
Log.GLOBAL_TAG = "flv.js";
Log.FORCE_GLOBAL_TAG = !1;
Log.ENABLE_ERROR = !0;
Log.ENABLE_INFO = !0;
Log.ENABLE_WARN = !0;
Log.ENABLE_DEBUG = !0;
Log.ENABLE_VERBOSE = !0;
Log.ENABLE_CALLBACK = !1;
Log.emitter = new EventEmitter$1();
class SpeedSampler {
  constructor() {
    this._firstCheckpoint = 0, this._lastCheckpoint = 0, this._intervalBytes = 0, this._totalBytes = 0, this._lastSecondBytes = 0, self.performance && self.performance.now ? this._now = self.performance.now.bind(self.performance) : this._now = Date.now;
  }
  reset() {
    this._firstCheckpoint = this._lastCheckpoint = 0, this._totalBytes = this._intervalBytes = 0, this._lastSecondBytes = 0;
  }
  addBytes(t) {
    this._firstCheckpoint === 0 ? (this._firstCheckpoint = this._now(), this._lastCheckpoint = this._firstCheckpoint, this._intervalBytes += t, this._totalBytes += t) : this._now() - this._lastCheckpoint < 1e3 ? (this._intervalBytes += t, this._totalBytes += t) : (this._lastSecondBytes = this._intervalBytes, this._intervalBytes = t, this._totalBytes += t, this._lastCheckpoint = this._now());
  }
  get currentKBps() {
    this.addBytes(0);
    let t = (this._now() - this._lastCheckpoint) / 1e3;
    return t == 0 && (t = 1), this._intervalBytes / t / 1024;
  }
  get lastSecondKBps() {
    return this.addBytes(0), this._lastSecondBytes !== 0 ? this._lastSecondBytes / 1024 : this._now() - this._lastCheckpoint >= 500 ? this.currentKBps : 0;
  }
  get averageKBps() {
    let t = (this._now() - this._firstCheckpoint) / 1e3;
    return this._totalBytes / t / 1024;
  }
}
class RuntimeException {
  constructor(t) {
    this._message = t;
  }
  get name() {
    return "RuntimeException";
  }
  get message() {
    return this._message;
  }
  toString() {
    return this.name + ": " + this.message;
  }
}
class IllegalStateException extends RuntimeException {
  constructor(t) {
    super(t);
  }
  get name() {
    return "IllegalStateException";
  }
}
class InvalidArgumentException extends RuntimeException {
  constructor(t) {
    super(t);
  }
  get name() {
    return "InvalidArgumentException";
  }
}
class NotImplementedException extends RuntimeException {
  constructor(t) {
    super(t);
  }
  get name() {
    return "NotImplementedException";
  }
}
const LoaderStatus = {
  kIdle: 0,
  kConnecting: 1,
  kBuffering: 2,
  kError: 3,
  kComplete: 4
}, LoaderErrors = {
  OK: "OK",
  EXCEPTION: "Exception",
  HTTP_STATUS_CODE_INVALID: "HttpStatusCodeInvalid",
  CONNECTING_TIMEOUT: "ConnectingTimeout",
  EARLY_EOF: "EarlyEof",
  UNRECOVERABLE_EARLY_EOF: "UnrecoverableEarlyEof"
};
class BaseLoader {
  constructor(t) {
    this._type = t || "undefined", this._status = LoaderStatus.kIdle, this._needStash = !1, this._onContentLengthKnown = null, this._onURLRedirect = null, this._onDataArrival = null, this._onError = null, this._onComplete = null;
  }
  destroy() {
    this._status = LoaderStatus.kIdle, this._onContentLengthKnown = null, this._onURLRedirect = null, this._onDataArrival = null, this._onError = null, this._onComplete = null;
  }
  isWorking() {
    return this._status === LoaderStatus.kConnecting || this._status === LoaderStatus.kBuffering;
  }
  get type() {
    return this._type;
  }
  get status() {
    return this._status;
  }
  get needStashBuffer() {
    return this._needStash;
  }
  get onContentLengthKnown() {
    return this._onContentLengthKnown;
  }
  set onContentLengthKnown(t) {
    this._onContentLengthKnown = t;
  }
  get onURLRedirect() {
    return this._onURLRedirect;
  }
  set onURLRedirect(t) {
    this._onURLRedirect = t;
  }
  get onDataArrival() {
    return this._onDataArrival;
  }
  set onDataArrival(t) {
    this._onDataArrival = t;
  }
  get onError() {
    return this._onError;
  }
  set onError(t) {
    this._onError = t;
  }
  get onComplete() {
    return this._onComplete;
  }
  set onComplete(t) {
    this._onComplete = t;
  }
  // pure virtual
  open(t, n) {
    throw new NotImplementedException("Unimplemented abstract function!");
  }
  abort() {
    throw new NotImplementedException("Unimplemented abstract function!");
  }
}
let Browser = {};
function detect() {
  let f = self.navigator.userAgent.toLowerCase(), t = /(edge)\/([\w.]+)/.exec(f) || /(opr)[\/]([\w.]+)/.exec(f) || /(chrome)[ \/]([\w.]+)/.exec(f) || /(iemobile)[\/]([\w.]+)/.exec(f) || /(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(f) || /(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(f) || /(webkit)[ \/]([\w.]+)/.exec(f) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(f) || /(msie) ([\w.]+)/.exec(f) || f.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(f) || f.indexOf("compatible") < 0 && /(firefox)[ \/]([\w.]+)/.exec(f) || [], n = /(ipad)/.exec(f) || /(ipod)/.exec(f) || /(windows phone)/.exec(f) || /(iphone)/.exec(f) || /(kindle)/.exec(f) || /(android)/.exec(f) || /(windows)/.exec(f) || /(mac)/.exec(f) || /(linux)/.exec(f) || /(cros)/.exec(f) || [], r = {
    browser: t[5] || t[3] || t[1] || "",
    version: t[2] || t[4] || "0",
    majorVersion: t[4] || t[2] || "0",
    platform: n[0] || ""
  }, l = {};
  if (r.browser) {
    l[r.browser] = !0;
    let a = r.majorVersion.split(".");
    l.version = {
      major: parseInt(r.majorVersion, 10),
      string: r.version
    }, a.length > 1 && (l.version.minor = parseInt(a[1], 10)), a.length > 2 && (l.version.build = parseInt(a[2], 10));
  }
  if (r.platform && (l[r.platform] = !0), (l.chrome || l.opr || l.safari) && (l.webkit = !0), l.rv || l.iemobile) {
    l.rv && delete l.rv;
    let a = "msie";
    r.browser = a, l[a] = !0;
  }
  if (l.edge) {
    delete l.edge;
    let a = "msedge";
    r.browser = a, l[a] = !0;
  }
  if (l.opr) {
    let a = "opera";
    r.browser = a, l[a] = !0;
  }
  if (l.safari && l.android) {
    let a = "android";
    r.browser = a, l[a] = !0;
  }
  l.name = r.browser, l.platform = r.platform;
  for (let a in Browser)
    Browser.hasOwnProperty(a) && delete Browser[a];
  Object.assign(Browser, l);
}
detect();
class FetchStreamLoader extends BaseLoader {
  static isSupported() {
    try {
      let t = Browser.msedge && Browser.version.minor >= 15048, n = Browser.msedge ? t : !0;
      return self.fetch && self.ReadableStream && n;
    } catch {
      return !1;
    }
  }
  constructor(t, n) {
    super("fetch-stream-loader"), this.TAG = "FetchStreamLoader", this._seekHandler = t, this._config = n, this._needStash = !0, this._requestAbort = !1, this._contentLength = null, this._receivedLength = 0;
  }
  destroy() {
    this.isWorking() && this.abort(), super.destroy();
  }
  open(t, n) {
    this._dataSource = t, this._range = n;
    let r = t.url;
    this._config.reuseRedirectedURL && t.redirectedURL != null && (r = t.redirectedURL);
    let l = this._seekHandler.getConfig(r, n), a = new self.Headers();
    if (typeof l.headers == "object") {
      let g = l.headers;
      for (let _ in g)
        g.hasOwnProperty(_) && a.append(_, g[_]);
    }
    let e = {
      method: "GET",
      headers: a,
      mode: "cors",
      cache: "default",
      // The default policy of Fetch API in the whatwg standard
      // Safari incorrectly indicates 'no-referrer' as default policy, fuck it
      referrerPolicy: "no-referrer-when-downgrade"
    };
    if (typeof this._config.headers == "object")
      for (let g in this._config.headers)
        a.append(g, this._config.headers[g]);
    t.cors === !1 && (e.mode = "same-origin"), t.withCredentials && (e.credentials = "include"), t.referrerPolicy && (e.referrerPolicy = t.referrerPolicy), self.AbortController && (this._abortController = new self.AbortController(), e.signal = this._abortController.signal), this._status = LoaderStatus.kConnecting, self.fetch(l.url, e).then((g) => {
      if (this._requestAbort) {
        this._status = LoaderStatus.kIdle, g.body.cancel();
        return;
      }
      if (g.ok && g.status >= 200 && g.status <= 299) {
        if (g.url !== l.url && this._onURLRedirect) {
          let y = this._seekHandler.removeURLParameters(g.url);
          this._onURLRedirect(y);
        }
        let _ = g.headers.get("Content-Length");
        return _ != null && (this._contentLength = parseInt(_), this._contentLength !== 0 && this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength)), this._pump.call(this, g.body.getReader());
      } else if (this._status = LoaderStatus.kError, this._onError)
        this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: g.status, msg: g.statusText });
      else
        throw new RuntimeException("FetchStreamLoader: Http code invalid, " + g.status + " " + g.statusText);
    }).catch((g) => {
      if (!(this._abortController && this._abortController.signal.aborted))
        if (this._status = LoaderStatus.kError, this._onError)
          this._onError(LoaderErrors.EXCEPTION, { code: -1, msg: g.message });
        else
          throw g;
    });
  }
  abort() {
    if (this._requestAbort = !0, (this._status !== LoaderStatus.kBuffering || !Browser.chrome) && this._abortController)
      try {
        this._abortController.abort();
      } catch {
      }
  }
  _pump(t) {
    return t.read().then((n) => {
      if (n.done)
        if (this._contentLength !== null && this._receivedLength < this._contentLength) {
          this._status = LoaderStatus.kError;
          let r = LoaderErrors.EARLY_EOF, l = { code: -1, msg: "Fetch stream meet Early-EOF" };
          if (this._onError)
            this._onError(r, l);
          else
            throw new RuntimeException(l.msg);
        } else
          this._status = LoaderStatus.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);
      else {
        if (this._abortController && this._abortController.signal.aborted) {
          this._status = LoaderStatus.kComplete;
          return;
        } else if (this._requestAbort === !0)
          return this._status = LoaderStatus.kComplete, t.cancel();
        this._status = LoaderStatus.kBuffering;
        let r = n.value.buffer, l = this._range.from + this._receivedLength;
        this._receivedLength += r.byteLength, this._onDataArrival && this._onDataArrival(r, l, this._receivedLength), this._pump(t);
      }
    }).catch((n) => {
      if (this._abortController && this._abortController.signal.aborted) {
        this._status = LoaderStatus.kComplete;
        return;
      }
      if (n.code === 11 && Browser.msedge)
        return;
      this._status = LoaderStatus.kError;
      let r = 0, l = null;
      if ((n.code === 19 || n.message === "network error") && // NETWORK_ERR
      (this._contentLength === null || this._contentLength !== null && this._receivedLength < this._contentLength) ? (r = LoaderErrors.EARLY_EOF, l = { code: n.code, msg: "Fetch stream meet Early-EOF" }) : (r = LoaderErrors.EXCEPTION, l = { code: n.code, msg: n.message }), this._onError)
        this._onError(r, l);
      else
        throw new RuntimeException(l.msg);
    });
  }
}
class MozChunkedLoader extends BaseLoader {
  static isSupported() {
    try {
      let t = new XMLHttpRequest();
      return t.open("GET", "https://example.com", !0), t.responseType = "moz-chunked-arraybuffer", t.responseType === "moz-chunked-arraybuffer";
    } catch (t) {
      return Log.w("MozChunkedLoader", t.message), !1;
    }
  }
  constructor(t, n) {
    super("xhr-moz-chunked-loader"), this.TAG = "MozChunkedLoader", this._seekHandler = t, this._config = n, this._needStash = !0, this._xhr = null, this._requestAbort = !1, this._contentLength = null, this._receivedLength = 0;
  }
  destroy() {
    this.isWorking() && this.abort(), this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onloadend = null, this._xhr.onerror = null, this._xhr = null), super.destroy();
  }
  open(t, n) {
    this._dataSource = t, this._range = n;
    let r = t.url;
    this._config.reuseRedirectedURL && t.redirectedURL != null && (r = t.redirectedURL);
    let l = this._seekHandler.getConfig(r, n);
    this._requestURL = l.url;
    let a = this._xhr = new XMLHttpRequest();
    if (a.open("GET", l.url, !0), a.responseType = "moz-chunked-arraybuffer", a.onreadystatechange = this._onReadyStateChange.bind(this), a.onprogress = this._onProgress.bind(this), a.onloadend = this._onLoadEnd.bind(this), a.onerror = this._onXhrError.bind(this), t.withCredentials && (a.withCredentials = !0), typeof l.headers == "object") {
      let e = l.headers;
      for (let g in e)
        e.hasOwnProperty(g) && a.setRequestHeader(g, e[g]);
    }
    if (typeof this._config.headers == "object") {
      let e = this._config.headers;
      for (let g in e)
        e.hasOwnProperty(g) && a.setRequestHeader(g, e[g]);
    }
    this._status = LoaderStatus.kConnecting, a.send();
  }
  abort() {
    this._requestAbort = !0, this._xhr && this._xhr.abort(), this._status = LoaderStatus.kComplete;
  }
  _onReadyStateChange(t) {
    let n = t.target;
    if (n.readyState === 2) {
      if (n.responseURL != null && n.responseURL !== this._requestURL && this._onURLRedirect) {
        let r = this._seekHandler.removeURLParameters(n.responseURL);
        this._onURLRedirect(r);
      }
      if (n.status !== 0 && (n.status < 200 || n.status > 299))
        if (this._status = LoaderStatus.kError, this._onError)
          this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: n.status, msg: n.statusText });
        else
          throw new RuntimeException("MozChunkedLoader: Http code invalid, " + n.status + " " + n.statusText);
      else
        this._status = LoaderStatus.kBuffering;
    }
  }
  _onProgress(t) {
    if (this._status === LoaderStatus.kError)
      return;
    this._contentLength === null && t.total !== null && t.total !== 0 && (this._contentLength = t.total, this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength));
    let n = t.target.response, r = this._range.from + this._receivedLength;
    this._receivedLength += n.byteLength, this._onDataArrival && this._onDataArrival(n, r, this._receivedLength);
  }
  _onLoadEnd(t) {
    if (this._requestAbort === !0) {
      this._requestAbort = !1;
      return;
    } else if (this._status === LoaderStatus.kError)
      return;
    this._status = LoaderStatus.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);
  }
  _onXhrError(t) {
    this._status = LoaderStatus.kError;
    let n = 0, r = null;
    if (this._contentLength && t.loaded < this._contentLength ? (n = LoaderErrors.EARLY_EOF, r = { code: -1, msg: "Moz-Chunked stream meet Early-Eof" }) : (n = LoaderErrors.EXCEPTION, r = { code: -1, msg: t.constructor.name + " " + t.type }), this._onError)
      this._onError(n, r);
    else
      throw new RuntimeException(r.msg);
  }
}
class RangeLoader extends BaseLoader {
  static isSupported() {
    try {
      let t = new XMLHttpRequest();
      return t.open("GET", "https://example.com", !0), t.responseType = "arraybuffer", t.responseType === "arraybuffer";
    } catch (t) {
      return Log.w("RangeLoader", t.message), !1;
    }
  }
  constructor(t, n) {
    super("xhr-range-loader"), this.TAG = "RangeLoader", this._seekHandler = t, this._config = n, this._needStash = !1, this._chunkSizeKBList = [
      128,
      256,
      384,
      512,
      768,
      1024,
      1536,
      2048,
      3072,
      4096,
      5120,
      6144,
      7168,
      8192
    ], this._currentChunkSizeKB = 384, this._currentSpeedNormalized = 0, this._zeroSpeedChunkCount = 0, this._xhr = null, this._speedSampler = new SpeedSampler(), this._requestAbort = !1, this._waitForTotalLength = !1, this._totalLengthReceived = !1, this._currentRequestURL = null, this._currentRedirectedURL = null, this._currentRequestRange = null, this._totalLength = null, this._contentLength = null, this._receivedLength = 0, this._lastTimeLoaded = 0;
  }
  destroy() {
    this.isWorking() && this.abort(), this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onload = null, this._xhr.onerror = null, this._xhr = null), super.destroy();
  }
  get currentSpeed() {
    return this._speedSampler.lastSecondKBps;
  }
  open(t, n) {
    this._dataSource = t, this._range = n, this._status = LoaderStatus.kConnecting;
    let r = !1;
    this._dataSource.filesize != null && this._dataSource.filesize !== 0 && (r = !0, this._totalLength = this._dataSource.filesize), !this._totalLengthReceived && !r ? (this._waitForTotalLength = !0, this._internalOpen(this._dataSource, { from: 0, to: -1 })) : this._openSubRange();
  }
  _openSubRange() {
    let t = this._currentChunkSizeKB * 1024, n = this._range.from + this._receivedLength, r = n + t;
    this._contentLength != null && r - this._range.from >= this._contentLength && (r = this._range.from + this._contentLength - 1), this._currentRequestRange = { from: n, to: r }, this._internalOpen(this._dataSource, this._currentRequestRange);
  }
  _internalOpen(t, n) {
    this._lastTimeLoaded = 0;
    let r = t.url;
    this._config.reuseRedirectedURL && (this._currentRedirectedURL != null ? r = this._currentRedirectedURL : t.redirectedURL != null && (r = t.redirectedURL));
    let l = this._seekHandler.getConfig(r, n);
    this._currentRequestURL = l.url;
    let a = this._xhr = new XMLHttpRequest();
    if (a.open("GET", l.url, !0), a.responseType = "arraybuffer", a.onreadystatechange = this._onReadyStateChange.bind(this), a.onprogress = this._onProgress.bind(this), a.onload = this._onLoad.bind(this), a.onerror = this._onXhrError.bind(this), t.withCredentials && (a.withCredentials = !0), typeof l.headers == "object") {
      let e = l.headers;
      for (let g in e)
        e.hasOwnProperty(g) && a.setRequestHeader(g, e[g]);
    }
    if (typeof this._config.headers == "object") {
      let e = this._config.headers;
      for (let g in e)
        e.hasOwnProperty(g) && a.setRequestHeader(g, e[g]);
    }
    a.send();
  }
  abort() {
    this._requestAbort = !0, this._internalAbort(), this._status = LoaderStatus.kComplete;
  }
  _internalAbort() {
    this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onload = null, this._xhr.onerror = null, this._xhr.abort(), this._xhr = null);
  }
  _onReadyStateChange(t) {
    let n = t.target;
    if (n.readyState === 2) {
      if (n.responseURL != null) {
        let r = this._seekHandler.removeURLParameters(n.responseURL);
        n.responseURL !== this._currentRequestURL && r !== this._currentRedirectedURL && (this._currentRedirectedURL = r, this._onURLRedirect && this._onURLRedirect(r));
      }
      if (n.status >= 200 && n.status <= 299) {
        if (this._waitForTotalLength)
          return;
        this._status = LoaderStatus.kBuffering;
      } else if (this._status = LoaderStatus.kError, this._onError)
        this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: n.status, msg: n.statusText });
      else
        throw new RuntimeException("RangeLoader: Http code invalid, " + n.status + " " + n.statusText);
    }
  }
  _onProgress(t) {
    if (this._status === LoaderStatus.kError)
      return;
    if (this._contentLength === null) {
      let r = !1;
      if (this._waitForTotalLength) {
        this._waitForTotalLength = !1, this._totalLengthReceived = !0, r = !0;
        let l = t.total;
        this._internalAbort(), l != null & l !== 0 && (this._totalLength = l);
      }
      if (this._range.to === -1 ? this._contentLength = this._totalLength - this._range.from : this._contentLength = this._range.to - this._range.from + 1, r) {
        this._openSubRange();
        return;
      }
      this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength);
    }
    let n = t.loaded - this._lastTimeLoaded;
    this._lastTimeLoaded = t.loaded, this._speedSampler.addBytes(n);
  }
  _normalizeSpeed(t) {
    let n = this._chunkSizeKBList, r = n.length - 1, l = 0, a = 0, e = r;
    if (t < n[0])
      return n[0];
    for (; a <= e; ) {
      if (l = a + Math.floor((e - a) / 2), l === r || t >= n[l] && t < n[l + 1])
        return n[l];
      n[l] < t ? a = l + 1 : e = l - 1;
    }
  }
  _onLoad(t) {
    if (this._status === LoaderStatus.kError)
      return;
    if (this._waitForTotalLength) {
      this._waitForTotalLength = !1;
      return;
    }
    this._lastTimeLoaded = 0;
    let n = this._speedSampler.lastSecondKBps;
    if (n === 0 && (this._zeroSpeedChunkCount++, this._zeroSpeedChunkCount >= 3 && (n = this._speedSampler.currentKBps)), n !== 0) {
      let e = this._normalizeSpeed(n);
      this._currentSpeedNormalized !== e && (this._currentSpeedNormalized = e, this._currentChunkSizeKB = e);
    }
    let r = t.target.response, l = this._range.from + this._receivedLength;
    this._receivedLength += r.byteLength;
    let a = !1;
    this._contentLength != null && this._receivedLength < this._contentLength ? this._openSubRange() : a = !0, this._onDataArrival && this._onDataArrival(r, l, this._receivedLength), a && (this._status = LoaderStatus.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1));
  }
  _onXhrError(t) {
    this._status = LoaderStatus.kError;
    let n = 0, r = null;
    if (this._contentLength && this._receivedLength > 0 && this._receivedLength < this._contentLength ? (n = LoaderErrors.EARLY_EOF, r = { code: -1, msg: "RangeLoader meet Early-Eof" }) : (n = LoaderErrors.EXCEPTION, r = { code: -1, msg: t.constructor.name + " " + t.type }), this._onError)
      this._onError(n, r);
    else
      throw new RuntimeException(r.msg);
  }
}
class WebSocketLoader extends BaseLoader {
  static isSupported() {
    try {
      return typeof self.WebSocket < "u";
    } catch {
      return !1;
    }
  }
  constructor(t, n) {
    super("websocket-loader"), this.TAG = "WebSocketLoader", this._config = n, this._needStash = !0, this._ws = null, this._requestAbort = !1, this._receivedLength = 0;
  }
  destroy() {
    this._ws && this.abort(), super.destroy();
  }
  open(t) {
    try {
      let n;
      this._config.ws ? n = this._ws = this._config.ws() : n = this._ws = new self.WebSocket(t.url), n.binaryType = "arraybuffer", n.onopen = this._onWebSocketOpen.bind(this), n.onclose = this._onWebSocketClose.bind(this), n.onmessage = this._onWebSocketMessage.bind(this), n.onerror = this._onWebSocketError.bind(this), this._status = LoaderStatus.kConnecting;
    } catch (n) {
      this._status = LoaderStatus.kError;
      let r = { code: n.code, msg: n.message };
      if (this._onError)
        this._onError(LoaderErrors.EXCEPTION, r);
      else
        throw new RuntimeException(r.msg);
    }
  }
  abort() {
    if (this._config.ws)
      return;
    let t = this._ws;
    t && (t.readyState === 0 || t.readyState === 1) && (this._requestAbort = !0, t.close()), this._ws = null, this._status = LoaderStatus.kComplete;
  }
  _onWebSocketOpen(t) {
    this._status = LoaderStatus.kBuffering, this._config.cbOpen(this._ws), window.wss = this._ws;
  }
  _onWebSocketClose(t) {
    if (this._requestAbort === !0) {
      this._requestAbort = !1;
      return;
    }
    this._status = LoaderStatus.kComplete, this._onComplete && this._onComplete(0, this._receivedLength - 1), this._config.cbClose(this._ws, t);
  }
  _onWebSocketMessage(t) {
    const n = this;
    this._config.cbMessage(this._ws, t, function(r) {
      if (r.data instanceof ArrayBuffer)
        n._dispatchArrayBuffer(r.data);
      else if (r.data instanceof Blob) {
        let l = new FileReader();
        l.onload = () => {
          n._dispatchArrayBuffer(l.result);
        }, l.readAsArrayBuffer(r.data);
      }
    });
  }
  _dispatchArrayBuffer(t, n = "") {
    let r = t, l = this._receivedLength;
    this._receivedLength += r.byteLength, this._onDataArrival && this._onDataArrival(r, l, n);
  }
  _onWebSocketError(t) {
    this._status = LoaderStatus.kError;
    let n = {
      code: t.code,
      msg: t.message
    };
    if (this._onError)
      this._onError(LoaderErrors.EXCEPTION, n);
    else
      throw new RuntimeException(n.msg);
    this._config.cbError(this._ws, t);
  }
}
class RangeSeekHandler {
  constructor(t) {
    this._zeroStart = t || !1;
  }
  getConfig(t, n) {
    let r = {};
    if (n.from !== 0 || n.to !== -1) {
      let l;
      n.to !== -1 ? l = `bytes=${n.from.toString()}-${n.to.toString()}` : l = `bytes=${n.from.toString()}-`, r.Range = l;
    } else
      this._zeroStart && (r.Range = "bytes=0-");
    return {
      url: t,
      headers: r
    };
  }
  removeURLParameters(t) {
    return t;
  }
}
class ParamSeekHandler {
  constructor(t, n) {
    this._startName = t, this._endName = n;
  }
  getConfig(t, n) {
    let r = t;
    if (n.from !== 0 || n.to !== -1) {
      let l = !0;
      r.indexOf("?") === -1 && (r += "?", l = !1), l && (r += "&"), r += `${this._startName}=${n.from.toString()}`, n.to !== -1 && (r += `&${this._endName}=${n.to.toString()}`);
    }
    return {
      url: r,
      headers: {}
    };
  }
  removeURLParameters(t) {
    let n = t.split("?")[0], r, l = t.indexOf("?");
    l !== -1 && (r = t.substring(l + 1));
    let a = "";
    if (r != null && r.length > 0) {
      let e = r.split("&");
      for (let g = 0; g < e.length; g++) {
        let _ = e[g].split("="), y = g > 0;
        _[0] !== this._startName && _[0] !== this._endName && (y && (a += "&"), a += e[g]);
      }
    }
    return a.length === 0 ? n : n + "?" + a;
  }
}
class IOController {
  constructor(t, n, r) {
    this.TAG = "IOController", this._config = n, this._extraData = r, this._stashInitialSize = 1024 * 384, n.stashInitialSize != null && n.stashInitialSize > 0 && (this._stashInitialSize = n.stashInitialSize), this._stashUsed = 0, this._stashSize = this._stashInitialSize, this._bufferSize = 1024 * 1024 * 3, this._stashBuffer = new ArrayBuffer(this._bufferSize), this._stashByteStart = 0, this._enableStash = !0, n.enableStashBuffer === !1 && (this._enableStash = !1), this._loader = null, this._loaderClass = null, this._seekHandler = null, this._dataSource = t, this._isWebSocketURL = !0, this._refTotalLength = t.filesize ? t.filesize : null, this._totalLength = this._refTotalLength, this._fullRequestFlag = !1, this._currentRange = null, this._redirectedURL = null, this._speedNormalized = 0, this._speedSampler = new SpeedSampler(), this._speedNormalizeList = [64, 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096], this._isEarlyEofReconnecting = !1, this._paused = !1, this._resumeFrom = 0, this._onDataArrival = null, this._onSeeked = null, this._onError = null, this._onComplete = null, this._onRedirect = null, this._onRecoveredEarlyEof = null, this._selectSeekHandler(), this._selectLoader(), this._createLoader();
  }
  destroy() {
    this._loader.isWorking() && this._loader.abort(), this._loader.destroy(), this._loader = null, this._loaderClass = null, this._dataSource = null, this._stashBuffer = null, this._stashUsed = this._stashSize = this._bufferSize = this._stashByteStart = 0, this._currentRange = null, this._speedSampler = null, this._isEarlyEofReconnecting = !1, this._onDataArrival = null, this._onSeeked = null, this._onError = null, this._onComplete = null, this._onRedirect = null, this._onRecoveredEarlyEof = null, this._extraData = null;
  }
  isWorking() {
    return this._loader && this._loader.isWorking() && !this._paused;
  }
  isPaused() {
    return this._paused;
  }
  get status() {
    return this._loader.status;
  }
  get extraData() {
    return this._extraData;
  }
  set extraData(t) {
    this._extraData = t;
  }
  // prototype: function onDataArrival(chunks: ArrayBuffer, byteStart: number): number
  get onDataArrival() {
    return this._onDataArrival;
  }
  set onDataArrival(t) {
    this._onDataArrival = t;
  }
  get onSeeked() {
    return this._onSeeked;
  }
  set onSeeked(t) {
    this._onSeeked = t;
  }
  // prototype: function onError(type: number, info: {code: number, msg: string}): void
  get onError() {
    return this._onError;
  }
  set onError(t) {
    this._onError = t;
  }
  get onComplete() {
    return this._onComplete;
  }
  set onComplete(t) {
    this._onComplete = t;
  }
  get onRedirect() {
    return this._onRedirect;
  }
  set onRedirect(t) {
    this._onRedirect = t;
  }
  get onRecoveredEarlyEof() {
    return this._onRecoveredEarlyEof;
  }
  set onRecoveredEarlyEof(t) {
    this._onRecoveredEarlyEof = t;
  }
  get currentURL() {
    return this._dataSource.url;
  }
  get hasRedirect() {
    return this._redirectedURL != null || this._dataSource.redirectedURL != null;
  }
  get currentRedirectedURL() {
    return this._redirectedURL || this._dataSource.redirectedURL;
  }
  // in KB/s
  get currentSpeed() {
    return this._loaderClass === RangeLoader ? this._loader.currentSpeed : this._speedSampler.lastSecondKBps;
  }
  get loaderType() {
    return this._loader.type;
  }
  _selectSeekHandler() {
    let t = this._config;
    if (t.seekType === "range")
      this._seekHandler = new RangeSeekHandler(this._config.rangeLoadZeroStart);
    else if (t.seekType === "param") {
      let n = t.seekParamStart || "bstart", r = t.seekParamEnd || "bend";
      this._seekHandler = new ParamSeekHandler(n, r);
    } else if (t.seekType === "custom") {
      if (typeof t.customSeekHandler != "function")
        throw new InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");
      this._seekHandler = new t.customSeekHandler();
    } else
      throw new InvalidArgumentException(`Invalid seekType in config: ${t.seekType}`);
  }
  _selectLoader() {
    if (this._config.customLoader != null)
      this._loaderClass = this._config.customLoader;
    else if (this._isWebSocketURL)
      this._loaderClass = WebSocketLoader;
    else if (FetchStreamLoader.isSupported())
      this._loaderClass = FetchStreamLoader;
    else if (MozChunkedLoader.isSupported())
      this._loaderClass = MozChunkedLoader;
    else if (RangeLoader.isSupported())
      this._loaderClass = RangeLoader;
    else
      throw new RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");
  }
  _createLoader() {
    this._loader = new this._loaderClass(this._seekHandler, this._config), this._loader.needStashBuffer === !1 && (this._enableStash = !1), this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this), this._loader.onURLRedirect = this._onURLRedirect.bind(this), this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this), this._loader.onComplete = this._onLoaderComplete.bind(this), this._loader.onError = this._onLoaderError.bind(this);
  }
  open(t) {
    this._currentRange = { from: 0, to: -1 }, t && (this._currentRange.from = t), this._speedSampler.reset(), t || (this._fullRequestFlag = !0), this._loader.open(this._dataSource, Object.assign({}, this._currentRange));
  }
  abort() {
    this._loader.abort(), this._paused && (this._paused = !1, this._resumeFrom = 0);
  }
  pause() {
    this.isWorking() && (this._loader.abort(), this._stashUsed !== 0 ? (this._resumeFrom = this._stashByteStart, this._currentRange.to = this._stashByteStart - 1) : this._resumeFrom = this._currentRange.to + 1, this._stashUsed = 0, this._stashByteStart = 0, this._paused = !0);
  }
  resume() {
    if (this._paused) {
      this._paused = !1;
      let t = this._resumeFrom;
      this._resumeFrom = 0, this._internalSeek(t, !0);
    }
  }
  seek(t) {
    this._paused = !1, this._stashUsed = 0, this._stashByteStart = 0, this._internalSeek(t, !0);
  }
  /**
   * When seeking request is from media seeking, unconsumed stash data should be dropped
   * However, stash data shouldn't be dropped if seeking requested from http reconnection
   *
   * @dropUnconsumed: Ignore and discard all unconsumed data in stash buffer
   */
  _internalSeek(t, n) {
    this._loader.isWorking() && this._loader.abort(), this._flushStashBuffer(n), this._loader.destroy(), this._loader = null;
    let r = { from: t, to: -1 };
    this._currentRange = { from: r.from, to: -1 }, this._speedSampler.reset(), this._stashSize = this._stashInitialSize, this._createLoader(), this._loader.open(this._dataSource, r), this._onSeeked && this._onSeeked();
  }
  updateUrl(t) {
    if (!t || typeof t != "string" || t.length === 0)
      throw new InvalidArgumentException("Url must be a non-empty string!");
    this._dataSource.url = t;
  }
  _expandBuffer(t) {
    let n = this._stashSize;
    for (; n + 1024 * 1024 * 1 < t; )
      n *= 2;
    if (n += 1024 * 1024 * 1, n === this._bufferSize)
      return;
    let r = new ArrayBuffer(n);
    if (this._stashUsed > 0) {
      let l = new Uint8Array(this._stashBuffer, 0, this._stashUsed);
      new Uint8Array(r, 0, n).set(l, 0);
    }
    this._stashBuffer = r, this._bufferSize = n;
  }
  _normalizeSpeed(t) {
    let n = this._speedNormalizeList, r = n.length - 1, l = 0, a = 0, e = r;
    if (t < n[0])
      return n[0];
    for (; a <= e; ) {
      if (l = a + Math.floor((e - a) / 2), l === r || t >= n[l] && t < n[l + 1])
        return n[l];
      n[l] < t ? a = l + 1 : e = l - 1;
    }
  }
  _adjustStashSize(t) {
    let n = 0;
    this._config.isLive || t < 512 ? n = t : t >= 512 && t <= 1024 ? n = Math.floor(t * 1.5) : n = t * 2, n > 8192 && (n = 8192);
    let r = n * 1024 + 1024 * 1024 * 1;
    this._bufferSize < r && this._expandBuffer(r), this._stashSize = n * 1024;
  }
  _dispatchChunks(t, n, r) {
    return r != "server_ended" && (this._currentRange.to = n + t.byteLength - 1), this._onDataArrival(t, n, r);
  }
  _onURLRedirect(t) {
    this._redirectedURL = t, this._onRedirect && this._onRedirect(t);
  }
  _onContentLengthKnown(t) {
    t && this._fullRequestFlag && (this._totalLength = t, this._fullRequestFlag = !1);
  }
  _onLoaderChunkArrival(t, n, r) {
    if (!this._onDataArrival)
      throw new IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");
    if (this._paused)
      return;
    this._isEarlyEofReconnecting && (this._isEarlyEofReconnecting = !1, this._onRecoveredEarlyEof && this._onRecoveredEarlyEof()), this._speedSampler.addBytes(t.byteLength);
    let l = this._speedSampler.lastSecondKBps;
    if (l !== 0) {
      let a = this._normalizeSpeed(l);
      this._speedNormalized !== a && (this._speedNormalized = a, this._adjustStashSize(a));
    }
    if (this._enableStash)
      if (this._stashUsed === 0 && this._stashByteStart === 0 && (this._stashByteStart = n), this._stashUsed + t.byteLength <= this._stashSize)
        new Uint8Array(this._stashBuffer, 0, this._stashSize).set(new Uint8Array(t), this._stashUsed), this._stashUsed += t.byteLength;
      else {
        let a = new Uint8Array(this._stashBuffer, 0, this._bufferSize);
        if (this._stashUsed > 0) {
          let e = this._stashBuffer.slice(0, this._stashUsed), g = this._dispatchChunks(e, this._stashByteStart);
          if (g < e.byteLength) {
            if (g > 0) {
              let _ = new Uint8Array(e, g);
              a.set(_, 0), this._stashUsed = _.byteLength, this._stashByteStart += g;
            }
          } else
            this._stashUsed = 0, this._stashByteStart += g;
          this._stashUsed + t.byteLength > this._bufferSize && (this._expandBuffer(this._stashUsed + t.byteLength), a = new Uint8Array(this._stashBuffer, 0, this._bufferSize)), a.set(new Uint8Array(t), this._stashUsed), this._stashUsed += t.byteLength;
        } else {
          let e = this._dispatchChunks(t, n);
          if (e < t.byteLength) {
            let g = t.byteLength - e;
            g > this._bufferSize && (this._expandBuffer(g), a = new Uint8Array(this._stashBuffer, 0, this._bufferSize)), a.set(new Uint8Array(t, e), 0), this._stashUsed += g, this._stashByteStart = n + e;
          }
        }
      }
    else if (this._stashUsed === 0) {
      let a = this._dispatchChunks(t, n, r);
      if (a < t.byteLength) {
        let e = t.byteLength - a;
        e > this._bufferSize && this._expandBuffer(e), new Uint8Array(this._stashBuffer, 0, this._bufferSize).set(new Uint8Array(t, a), 0), this._stashUsed += e, this._stashByteStart = n + a;
      }
    } else {
      this._stashUsed + t.byteLength > this._bufferSize && this._expandBuffer(this._stashUsed + t.byteLength);
      let a = new Uint8Array(this._stashBuffer, 0, this._bufferSize);
      a.set(new Uint8Array(t), this._stashUsed), this._stashUsed += t.byteLength;
      let e = this._dispatchChunks(this._stashBuffer.slice(0, this._stashUsed), this._stashByteStart, r);
      if (e < this._stashUsed && e > 0) {
        let g = new Uint8Array(this._stashBuffer, e);
        a.set(g, 0);
      }
      this._stashUsed -= e, this._stashByteStart += e;
    }
  }
  _flushStashBuffer(t) {
    if (this._stashUsed > 0) {
      let n = this._stashBuffer.slice(0, this._stashUsed), r = this._dispatchChunks(n, this._stashByteStart), l = n.byteLength - r;
      if (r < n.byteLength)
        if (t)
          Log.w(this.TAG, `${l} bytes unconsumed data remain when flush buffer, dropped`);
        else {
          if (r > 0) {
            let a = new Uint8Array(this._stashBuffer, 0, this._bufferSize), e = new Uint8Array(n, r);
            a.set(e, 0), this._stashUsed = e.byteLength, this._stashByteStart += r;
          }
          return 0;
        }
      return this._stashUsed = 0, this._stashByteStart = 0, l;
    }
    return 0;
  }
  _onLoaderComplete(t, n) {
    this._flushStashBuffer(!0), this._onComplete && this._onComplete(this._extraData);
  }
  _onLoaderError(t, n) {
    switch (Log.e(this.TAG, `Loader error, code = ${n.code}, msg = ${n.msg}`), this._flushStashBuffer(!1), this._isEarlyEofReconnecting && (this._isEarlyEofReconnecting = !1, t = LoaderErrors.UNRECOVERABLE_EARLY_EOF), t) {
      case LoaderErrors.EARLY_EOF: {
        if (!this._config.isLive && this._totalLength) {
          let r = this._currentRange.to + 1;
          r < this._totalLength && (Log.w(this.TAG, "Connection lost, trying reconnect..."), this._isEarlyEofReconnecting = !0, this._internalSeek(r, !1));
          return;
        }
        t = LoaderErrors.UNRECOVERABLE_EARLY_EOF;
        break;
      }
      case LoaderErrors.UNRECOVERABLE_EARLY_EOF:
      case LoaderErrors.CONNECTING_TIMEOUT:
      case LoaderErrors.HTTP_STATUS_CODE_INVALID:
      case LoaderErrors.EXCEPTION:
        break;
    }
    if (this._onError)
      this._onError(t, n);
    else
      throw new RuntimeException("IOException: " + n.msg);
  }
}
const defaultConfig = {
  enableWorker: !1,
  enableStashBuffer: !0,
  stashInitialSize: void 0,
  isLive: !1,
  lazyLoad: !0,
  lazyLoadMaxDuration: 3 * 60,
  lazyLoadRecoverDuration: 30,
  deferLoadAfterSourceOpen: !0,
  // autoCleanupSourceBuffer: default as false, leave unspecified
  autoCleanupMaxBackwardDuration: 3 * 60,
  autoCleanupMinBackwardDuration: 2 * 60,
  statisticsInfoReportInterval: 600,
  fixAudioTimestampGap: !0,
  accurateSeek: !1,
  seekType: "range",
  // [range, param, custom]
  seekParamStart: "bstart",
  seekParamEnd: "bend",
  rangeLoadZeroStart: !1,
  customSeekHandler: void 0,
  reuseRedirectedURL: !1,
  // referrerPolicy: leave as unspecified
  headers: void 0,
  customLoader: void 0
};
function createDefaultConfig() {
  return Object.assign({}, defaultConfig);
}
class Features {
  static supportMSEH264Playback() {
    return window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');
  }
  static supportNetworkStreamIO() {
    let t = new IOController({}, createDefaultConfig()), n = t.loaderType;
    return t.destroy(), n == "fetch-stream-loader" || n == "xhr-moz-chunked-loader";
  }
  static getNetworkLoaderTypeName() {
    let t = new IOController({}, createDefaultConfig()), n = t.loaderType;
    return t.destroy(), n;
  }
  static supportNativeMediaPlayback(t) {
    Features.videoElement == null && (Features.videoElement = window.document.createElement("video"));
    let n = Features.videoElement.canPlayType(t);
    return n === "probably" || n == "maybe";
  }
  static getFeatureList() {
    let t = {
      mseFlvPlayback: !1,
      mseLiveFlvPlayback: !1,
      networkStreamIO: !1,
      networkLoaderName: "",
      nativeMP4H264Playback: !1,
      nativeWebmVP8Playback: !1,
      nativeWebmVP9Playback: !1
    };
    return t.mseFlvPlayback = Features.supportMSEH264Playback(), t.networkStreamIO = Features.supportNetworkStreamIO(), t.networkLoaderName = Features.getNetworkLoaderTypeName(), t.mseLiveFlvPlayback = t.mseFlvPlayback && t.networkStreamIO, t.nativeMP4H264Playback = Features.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'), t.nativeWebmVP8Playback = Features.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'), t.nativeWebmVP9Playback = Features.supportNativeMediaPlayback('video/webm; codecs="vp9"'), t;
  }
}
const PlayerEvents = {
  ERROR: "error",
  LOADING_COMPLETE: "loading_complete",
  RECOVERED_EARLY_EOF: "recovered_early_eof",
  MEDIA_INFO: "media_info",
  METADATA_ARRIVED: "metadata_arrived",
  SCRIPTDATA_ARRIVED: "scriptdata_arrived",
  STATISTICS_INFO: "statistics_info"
};
var webworkifyWebpack = { exports: {} };
(function(f) {
  function t(y) {
    var x = {};
    function E(L) {
      if (x[L])
        return x[L].exports;
      var A = x[L] = {
        /******/
        i: L,
        /******/
        l: !1,
        /******/
        exports: {}
        /******/
      };
      return y[L].call(A.exports, A, A.exports, E), A.l = !0, A.exports;
    }
    E.m = y, E.c = x, E.i = function(L) {
      return L;
    }, E.d = function(L, A, I) {
      E.o(L, A) || Object.defineProperty(L, A, {
        /******/
        configurable: !1,
        /******/
        enumerable: !0,
        /******/
        get: I
        /******/
      });
    }, E.r = function(L) {
      Object.defineProperty(L, "__esModule", { value: !0 });
    }, E.n = function(L) {
      var A = L && L.__esModule ? (
        /******/
        function() {
          return L.default;
        }
      ) : (
        /******/
        function() {
          return L;
        }
      );
      return E.d(A, "a", A), A;
    }, E.o = function(L, A) {
      return Object.prototype.hasOwnProperty.call(L, A);
    }, E.p = "/", E.oe = function(L) {
      throw console.error(L), L;
    };
    var C = E(E.s = ENTRY_MODULE);
    return C.default || C;
  }
  var n = "[\\.|\\-|\\+|\\w|/|@]+", r = "\\(\\s*(/\\*.*?\\*/)?\\s*.*?(" + n + ").*?\\)";
  function l(y) {
    return (y + "").replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
  }
  function a(y) {
    return !isNaN(1 * y);
  }
  function e(y, x, E) {
    var C = {};
    C[E] = [];
    var L = x.toString(), A = L.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);
    if (!A)
      return C;
    for (var I = A[1], D = new RegExp("(\\\\n|\\W)" + l(I) + r, "g"), w; w = D.exec(L); )
      w[3] !== "dll-reference" && C[E].push(w[3]);
    for (D = new RegExp("\\(" + l(I) + '\\("(dll-reference\\s(' + n + '))"\\)\\)' + r, "g"); w = D.exec(L); )
      y[w[2]] || (C[E].push(w[1]), y[w[2]] = __webpack_require__(w[1]).m), C[w[2]] = C[w[2]] || [], C[w[2]].push(w[4]);
    for (var S = Object.keys(C), O = 0; O < S.length; O++)
      for (var F = 0; F < C[S[O]].length; F++)
        a(C[S[O]][F]) && (C[S[O]][F] = 1 * C[S[O]][F]);
    return C;
  }
  function g(y) {
    var x = Object.keys(y);
    return x.reduce(function(E, C) {
      return E || y[C].length > 0;
    }, !1);
  }
  function _(y, x) {
    for (var E = {
      main: [x]
    }, C = {
      main: []
    }, L = {
      main: {}
    }; g(E); )
      for (var A = Object.keys(E), I = 0; I < A.length; I++) {
        var D = A[I], w = E[D], S = w.pop();
        if (L[D] = L[D] || {}, !(L[D][S] || !y[D][S])) {
          L[D][S] = !0, C[D] = C[D] || [], C[D].push(S);
          for (var O = e(y, y[D][S], D), F = Object.keys(O), j = 0; j < F.length; j++)
            E[F[j]] = E[F[j]] || [], E[F[j]] = E[F[j]].concat(O[F[j]]);
        }
      }
    return C;
  }
  f.exports = function(y, x) {
    x = x || {};
    var E = {
      main: __webpack_modules__
    }, C = x.all ? { main: Object.keys(E.main) } : _(E, y), L = "";
    Object.keys(C).filter(function(S) {
      return S !== "main";
    }).forEach(function(S) {
      for (var O = 0; C[S][O]; )
        O++;
      C[S].push(O), E[S][O] = "(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })", L = L + "var " + S + " = (" + t.toString().replace("ENTRY_MODULE", JSON.stringify(O)) + ")({" + C[S].map(function(F) {
        return "" + JSON.stringify(F) + ": " + E[S][F].toString();
      }).join(",") + `});
`;
    }), L = L + "new ((" + t.toString().replace("ENTRY_MODULE", JSON.stringify(y)) + ")({" + C.main.map(function(S) {
      return "" + JSON.stringify(S) + ": " + E.main[S].toString();
    }).join(",") + "}))(self);";
    var A = new window.Blob([L], { type: "text/javascript" });
    if (x.bare)
      return A;
    var I = window.URL || window.webkitURL || window.mozURL || window.msURL, D = I.createObjectURL(A), w = new window.Worker(D);
    return w.objectURL = D, w;
  };
})(webworkifyWebpack);
class LoggingControl {
  static get forceGlobalTag() {
    return Log.FORCE_GLOBAL_TAG;
  }
  static set forceGlobalTag(t) {
    Log.FORCE_GLOBAL_TAG = t, LoggingControl._notifyChange();
  }
  static get globalTag() {
    return Log.GLOBAL_TAG;
  }
  static set globalTag(t) {
    Log.GLOBAL_TAG = t, LoggingControl._notifyChange();
  }
  static get enableAll() {
    return Log.ENABLE_VERBOSE && Log.ENABLE_DEBUG && Log.ENABLE_INFO && Log.ENABLE_WARN && Log.ENABLE_ERROR;
  }
  static set enableAll(t) {
    Log.ENABLE_VERBOSE = t, Log.ENABLE_DEBUG = t, Log.ENABLE_INFO = t, Log.ENABLE_WARN = t, Log.ENABLE_ERROR = t, LoggingControl._notifyChange();
  }
  static get enableDebug() {
    return Log.ENABLE_DEBUG;
  }
  static set enableDebug(t) {
    Log.ENABLE_DEBUG = t, LoggingControl._notifyChange();
  }
  static get enableVerbose() {
    return Log.ENABLE_VERBOSE;
  }
  static set enableVerbose(t) {
    Log.ENABLE_VERBOSE = t, LoggingControl._notifyChange();
  }
  static get enableInfo() {
    return Log.ENABLE_INFO;
  }
  static set enableInfo(t) {
    Log.ENABLE_INFO = t, LoggingControl._notifyChange();
  }
  static get enableWarn() {
    return Log.ENABLE_WARN;
  }
  static set enableWarn(t) {
    Log.ENABLE_WARN = t, LoggingControl._notifyChange();
  }
  static get enableError() {
    return Log.ENABLE_ERROR;
  }
  static set enableError(t) {
    Log.ENABLE_ERROR = t, LoggingControl._notifyChange();
  }
  static getConfig() {
    return {
      globalTag: Log.GLOBAL_TAG,
      forceGlobalTag: Log.FORCE_GLOBAL_TAG,
      enableVerbose: Log.ENABLE_VERBOSE,
      enableDebug: Log.ENABLE_DEBUG,
      enableInfo: Log.ENABLE_INFO,
      enableWarn: Log.ENABLE_WARN,
      enableError: Log.ENABLE_ERROR,
      enableCallback: Log.ENABLE_CALLBACK
    };
  }
  static applyConfig(t) {
    Log.GLOBAL_TAG = t.globalTag, Log.FORCE_GLOBAL_TAG = t.forceGlobalTag, Log.ENABLE_VERBOSE = t.enableVerbose, Log.ENABLE_DEBUG = t.enableDebug, Log.ENABLE_INFO = t.enableInfo, Log.ENABLE_WARN = t.enableWarn, Log.ENABLE_ERROR = t.enableError, Log.ENABLE_CALLBACK = t.enableCallback;
  }
  static _notifyChange() {
    let t = LoggingControl.emitter;
    if (t.listenerCount("change") > 0) {
      let n = LoggingControl.getConfig();
      t.emit("change", n);
    }
  }
  static registerListener(t) {
    LoggingControl.emitter.addListener("change", t);
  }
  static removeListener(t) {
    LoggingControl.emitter.removeListener("change", t);
  }
  static addLogListener(t) {
    Log.emitter.addListener("log", t), Log.emitter.listenerCount("log") > 0 && (Log.ENABLE_CALLBACK = !0, LoggingControl._notifyChange());
  }
  static removeLogListener(t) {
    Log.emitter.removeListener("log", t), Log.emitter.listenerCount("log") === 0 && (Log.ENABLE_CALLBACK = !1, LoggingControl._notifyChange());
  }
}
LoggingControl.emitter = new EventEmitter$1();
class MediaInfo {
  constructor() {
    this.mimeType = null, this.duration = null, this.hasAudio = null, this.hasVideo = null, this.audioCodec = null, this.videoCodec = null, this.audioDataRate = null, this.videoDataRate = null, this.audioSampleRate = null, this.audioChannelCount = null, this.width = null, this.height = null, this.fps = null, this.profile = null, this.level = null, this.refFrames = null, this.chromaFormat = null, this.sarNum = null, this.sarDen = null, this.metadata = null, this.segments = null, this.segmentCount = null, this.hasKeyframesIndex = null, this.keyframesIndex = null;
  }
  isComplete() {
    let t = this.hasAudio === !1 || this.hasAudio === !0 && this.audioCodec != null && this.audioSampleRate != null && this.audioChannelCount != null, n = this.hasVideo === !1 || this.hasVideo === !0 && this.videoCodec != null && this.width != null && this.height != null && this.fps != null && this.profile != null && this.level != null && this.refFrames != null && this.chromaFormat != null && this.sarNum != null && this.sarDen != null;
    return this.mimeType != null && this.duration != null && this.metadata != null && this.hasKeyframesIndex != null && t && n;
  }
  isSeekable() {
    return this.hasKeyframesIndex === !0;
  }
  getNearestKeyframe(t) {
    if (this.keyframesIndex == null)
      return null;
    let n = this.keyframesIndex, r = this._search(n.times, t);
    return {
      index: r,
      milliseconds: n.times[r],
      fileposition: n.filepositions[r]
    };
  }
  _search(t, n) {
    let r = 0, l = t.length - 1, a = 0, e = 0, g = l;
    for (n < t[0] && (r = 0, e = g + 1); e <= g; )
      if (a = e + Math.floor((g - e) / 2), a === l || n >= t[a] && n < t[a + 1]) {
        r = a;
        break;
      } else
        t[a] < n ? e = a + 1 : g = a - 1;
    return r;
  }
}
function checkContinuation(f, t, n) {
  let r = f;
  if (t + n < r.length) {
    for (; n--; )
      if ((r[++t] & 192) !== 128)
        return !1;
    return !0;
  } else
    return !1;
}
function decodeUTF8(f) {
  let t = [], n = f, r = 0, l = f.length;
  for (; r < l; ) {
    if (n[r] < 128) {
      t.push(String.fromCharCode(n[r])), ++r;
      continue;
    } else if (!(n[r] < 192)) {
      if (n[r] < 224) {
        if (checkContinuation(n, r, 1)) {
          let a = (n[r] & 31) << 6 | n[r + 1] & 63;
          if (a >= 128) {
            t.push(String.fromCharCode(a & 65535)), r += 2;
            continue;
          }
        }
      } else if (n[r] < 240) {
        if (checkContinuation(n, r, 2)) {
          let a = (n[r] & 15) << 12 | (n[r + 1] & 63) << 6 | n[r + 2] & 63;
          if (a >= 2048 && (a & 63488) !== 55296) {
            t.push(String.fromCharCode(a & 65535)), r += 3;
            continue;
          }
        }
      } else if (n[r] < 248 && checkContinuation(n, r, 3)) {
        let a = (n[r] & 7) << 18 | (n[r + 1] & 63) << 12 | (n[r + 2] & 63) << 6 | n[r + 3] & 63;
        if (a > 65536 && a < 1114112) {
          a -= 65536, t.push(String.fromCharCode(a >>> 10 | 55296)), t.push(String.fromCharCode(a & 1023 | 56320)), r += 4;
          continue;
        }
      }
    }
    t.push(String.fromCharCode(65533)), ++r;
  }
  return t.join("");
}
let le = function() {
  let f = new ArrayBuffer(2);
  return new DataView(f).setInt16(0, 256, !0), new Int16Array(f)[0] === 256;
}();
class AMF {
  static parseScriptData(t, n, r) {
    let l = {};
    try {
      let a = AMF.parseValue(t, n, r), e = AMF.parseValue(t, n + a.size, r - a.size);
      l[a.data] = e.data;
    } catch (a) {
      Log.e("AMF", a.toString());
    }
    return l;
  }
  static parseObject(t, n, r) {
    if (r < 3)
      throw new IllegalStateException("Data not enough when parse ScriptDataObject");
    let l = AMF.parseString(t, n, r), a = AMF.parseValue(t, n + l.size, r - l.size), e = a.objectEnd;
    return {
      data: {
        name: l.data,
        value: a.data
      },
      size: l.size + a.size,
      objectEnd: e
    };
  }
  static parseVariable(t, n, r) {
    return AMF.parseObject(t, n, r);
  }
  static parseString(t, n, r) {
    if (r < 2)
      throw new IllegalStateException("Data not enough when parse String");
    let a = new DataView(t, n, r).getUint16(0, !le), e;
    return a > 0 ? e = decodeUTF8(new Uint8Array(t, n + 2, a)) : e = "", {
      data: e,
      size: 2 + a
    };
  }
  static parseLongString(t, n, r) {
    if (r < 4)
      throw new IllegalStateException("Data not enough when parse LongString");
    let a = new DataView(t, n, r).getUint32(0, !le), e;
    return a > 0 ? e = decodeUTF8(new Uint8Array(t, n + 4, a)) : e = "", {
      data: e,
      size: 4 + a
    };
  }
  static parseDate(t, n, r) {
    if (r < 10)
      throw new IllegalStateException("Data size invalid when parse Date");
    let l = new DataView(t, n, r), a = l.getFloat64(0, !le), e = l.getInt16(8, !le);
    return a += e * 60 * 1e3, {
      data: new Date(a),
      size: 8 + 2
    };
  }
  static parseValue(t, n, r) {
    if (r < 1)
      throw new IllegalStateException("Data not enough when parse Value");
    let l = new DataView(t, n, r), a = 1, e = l.getUint8(0), g, _ = !1;
    try {
      switch (e) {
        case 0:
          g = l.getFloat64(1, !le), a += 8;
          break;
        case 1: {
          g = !!l.getUint8(1), a += 1;
          break;
        }
        case 2: {
          let y = AMF.parseString(t, n + 1, r - 1);
          g = y.data, a += y.size;
          break;
        }
        case 3: {
          g = {};
          let y = 0;
          for ((l.getUint32(r - 4, !le) & 16777215) === 9 && (y = 3); a < r - 4; ) {
            let x = AMF.parseObject(t, n + a, r - a - y);
            if (x.objectEnd)
              break;
            g[x.data.name] = x.data.value, a += x.size;
          }
          a <= r - 3 && (l.getUint32(a - 1, !le) & 16777215) === 9 && (a += 3);
          break;
        }
        case 8: {
          g = {}, a += 4;
          let y = 0;
          for ((l.getUint32(r - 4, !le) & 16777215) === 9 && (y = 3); a < r - 8; ) {
            let x = AMF.parseVariable(t, n + a, r - a - y);
            if (x.objectEnd)
              break;
            g[x.data.name] = x.data.value, a += x.size;
          }
          a <= r - 3 && (l.getUint32(a - 1, !le) & 16777215) === 9 && (a += 3);
          break;
        }
        case 9:
          g = void 0, a = 1, _ = !0;
          break;
        case 10: {
          g = [];
          let y = l.getUint32(1, !le);
          a += 4;
          for (let x = 0; x < y; x++) {
            let E = AMF.parseValue(t, n + a, r - a);
            g.push(E.data), a += E.size;
          }
          break;
        }
        case 11: {
          let y = AMF.parseDate(t, n + 1, r - 1);
          g = y.data, a += y.size;
          break;
        }
        case 12: {
          let y = AMF.parseString(t, n + 1, r - 1);
          g = y.data, a += y.size;
          break;
        }
        default:
          a = r, Log.w("AMF", "Unsupported AMF value type " + e);
      }
    } catch (y) {
      Log.e("AMF", y.toString());
    }
    return {
      data: g,
      size: a,
      objectEnd: _
    };
  }
}
class ExpGolomb {
  constructor(t) {
    this.TAG = "ExpGolomb", this._buffer = t, this._buffer_index = 0, this._total_bytes = t.byteLength, this._total_bits = t.byteLength * 8, this._current_word = 0, this._current_word_bits_left = 0;
  }
  destroy() {
    this._buffer = null;
  }
  _fillCurrentWord() {
    let t = this._total_bytes - this._buffer_index;
    if (t <= 0)
      throw new IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");
    let n = Math.min(4, t), r = new Uint8Array(4);
    r.set(this._buffer.subarray(this._buffer_index, this._buffer_index + n)), this._current_word = new DataView(r.buffer).getUint32(0, !1), this._buffer_index += n, this._current_word_bits_left = n * 8;
  }
  readBits(t) {
    if (t > 32)
      throw new InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");
    if (t <= this._current_word_bits_left) {
      let e = this._current_word >>> 32 - t;
      return this._current_word <<= t, this._current_word_bits_left -= t, e;
    }
    let n = this._current_word_bits_left ? this._current_word : 0;
    n = n >>> 32 - this._current_word_bits_left;
    let r = t - this._current_word_bits_left;
    this._fillCurrentWord();
    let l = Math.min(r, this._current_word_bits_left), a = this._current_word >>> 32 - l;
    return this._current_word <<= l, this._current_word_bits_left -= l, n = n << l | a, n;
  }
  readBool() {
    return this.readBits(1) === 1;
  }
  readByte() {
    return this.readBits(8);
  }
  _skipLeadingZero() {
    let t;
    for (t = 0; t < this._current_word_bits_left; t++)
      if (this._current_word & 2147483648 >>> t)
        return this._current_word <<= t, this._current_word_bits_left -= t, t;
    return this._fillCurrentWord(), t + this._skipLeadingZero();
  }
  readUEG() {
    let t = this._skipLeadingZero();
    return this.readBits(t + 1) - 1;
  }
  readSEG() {
    let t = this.readUEG();
    return t & 1 ? t + 1 >>> 1 : -1 * (t >>> 1);
  }
}
class SPSParser {
  static _ebsp2rbsp(t) {
    let n = t, r = n.byteLength, l = new Uint8Array(r), a = 0;
    for (let e = 0; e < r; e++)
      e >= 2 && n[e] === 3 && n[e - 1] === 0 && n[e - 2] === 0 || (l[a] = n[e], a++);
    return new Uint8Array(l.buffer, 0, a);
  }
  static parseSPS(t) {
    let n = SPSParser._ebsp2rbsp(t), r = new ExpGolomb(n);
    r.readByte();
    let l = r.readByte();
    r.readByte();
    let a = r.readByte();
    r.readUEG();
    let e = SPSParser.getProfileString(l), g = SPSParser.getLevelString(a), _ = 1, y = 420, x = [0, 420, 422, 444], E = 8;
    if ((l === 100 || l === 110 || l === 122 || l === 244 || l === 44 || l === 83 || l === 86 || l === 118 || l === 128 || l === 138 || l === 144) && (_ = r.readUEG(), _ === 3 && r.readBits(1), _ <= 3 && (y = x[_]), E = r.readUEG() + 8, r.readUEG(), r.readBits(1), r.readBool())) {
      let de = _ !== 3 ? 8 : 12;
      for (let ve = 0; ve < de; ve++)
        r.readBool() && (ve < 6 ? SPSParser._skipScalingList(r, 16) : SPSParser._skipScalingList(r, 64));
    }
    r.readUEG();
    let C = r.readUEG();
    if (C === 0)
      r.readUEG();
    else if (C === 1) {
      r.readBits(1), r.readSEG(), r.readSEG();
      let de = r.readUEG();
      for (let ve = 0; ve < de; ve++)
        r.readSEG();
    }
    let L = r.readUEG();
    r.readBits(1);
    let A = r.readUEG(), I = r.readUEG(), D = r.readBits(1);
    D === 0 && r.readBits(1), r.readBits(1);
    let w = 0, S = 0, O = 0, F = 0;
    r.readBool() && (w = r.readUEG(), S = r.readUEG(), O = r.readUEG(), F = r.readUEG());
    let P = 1, $ = 1, V = 0, q = !0, ee = 0, re = 0;
    if (r.readBool()) {
      if (r.readBool()) {
        let de = r.readByte(), ve = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2], ae = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1];
        de > 0 && de < 16 ? (P = ve[de - 1], $ = ae[de - 1]) : de === 255 && (P = r.readByte() << 8 | r.readByte(), $ = r.readByte() << 8 | r.readByte());
      }
      if (r.readBool() && r.readBool(), r.readBool() && (r.readBits(4), r.readBool() && r.readBits(24)), r.readBool() && (r.readUEG(), r.readUEG()), r.readBool()) {
        let de = r.readBits(32), ve = r.readBits(32);
        q = r.readBool(), ee = ve, re = de * 2, V = ee / re;
      }
    }
    let ce = 1;
    (P !== 1 || $ !== 1) && (ce = P / $);
    let Q = 0, se = 0;
    if (_ === 0)
      Q = 1, se = 2 - D;
    else {
      let de = _ === 3 ? 1 : 2, ve = _ === 1 ? 2 : 1;
      Q = de, se = ve * (2 - D);
    }
    let fe = (A + 1) * 16, G = (2 - D) * ((I + 1) * 16);
    fe -= (w + S) * Q, G -= (O + F) * se;
    let K = Math.ceil(fe * ce);
    return r.destroy(), r = null, {
      profile_string: e,
      // baseline, high, high10, ...
      level_string: g,
      // 3, 3.1, 4, 4.1, 5, 5.1, ...
      bit_depth: E,
      // 8bit, 10bit, ...
      ref_frames: L,
      chroma_format: y,
      // 4:2:0, 4:2:2, ...
      chroma_format_string: SPSParser.getChromaFormatString(y),
      frame_rate: {
        fixed: q,
        fps: V,
        fps_den: re,
        fps_num: ee
      },
      sar_ratio: {
        width: P,
        height: $
      },
      codec_size: {
        width: fe,
        height: G
      },
      present_size: {
        width: K,
        height: G
      }
    };
  }
  static _skipScalingList(t, n) {
    let r = 8, l = 8, a = 0;
    for (let e = 0; e < n; e++)
      l !== 0 && (a = t.readSEG(), l = (r + a + 256) % 256), r = l === 0 ? r : l;
  }
  static getProfileString(t) {
    switch (t) {
      case 66:
        return "Baseline";
      case 77:
        return "Main";
      case 88:
        return "Extended";
      case 100:
        return "High";
      case 110:
        return "High10";
      case 122:
        return "High422";
      case 244:
        return "High444";
      default:
        return "Unknown";
    }
  }
  static getLevelString(t) {
    return (t / 10).toFixed(1);
  }
  static getChromaFormatString(t) {
    switch (t) {
      case 420:
        return "4:2:0";
      case 422:
        return "4:2:2";
      case 444:
        return "4:4:4";
      default:
        return "Unknown";
    }
  }
}
const DemuxErrors = {
  OK: "OK",
  FORMAT_ERROR: "FormatError",
  FORMAT_UNSUPPORTED: "FormatUnsupported",
  CODEC_UNSUPPORTED: "CodecUnsupported"
};
function ReadBig32(f, t) {
  return f[t] << 24 | f[t + 1] << 16 | f[t + 2] << 8 | f[t + 3];
}
class FLVDemuxer {
  constructor(t, n) {
    this.TAG = "FLVDemuxer", this._config = n, this._onError = null, this._onMediaInfo = null, this._onMetaDataArrived = null, this._onScriptDataArrived = null, this._onTrackMetadata = null, this._onDataAvailable = null, this._dataOffset = t.dataOffset, this._firstParse = !0, this._dispatch = !1, this._hasAudio = t.hasAudioTrack, this._hasVideo = t.hasVideoTrack, this._hasAudioFlagOverrided = !1, this._hasVideoFlagOverrided = !1, this._audioInitialMetadataDispatched = !1, this._videoInitialMetadataDispatched = !1, this._mediaInfo = new MediaInfo(), this._mediaInfo.hasAudio = this._hasAudio, this._mediaInfo.hasVideo = this._hasVideo, this._metadata = null, this._audioMetadata = null, this._videoMetadata = null, this._naluLengthSize = 4, this._timestampBase = 0, this._timescale = 1e3, this._duration = 0, this._durationOverrided = !1, this._referenceFrameRate = {
      fixed: !0,
      fps: 23.976,
      fps_num: 23976,
      fps_den: 1e3
    }, this._flvSoundRateTable = [5500, 11025, 22050, 44100, 48e3], this._mpegSamplingRates = [
      96e3,
      88200,
      64e3,
      48e3,
      44100,
      32e3,
      24e3,
      22050,
      16e3,
      12e3,
      11025,
      8e3,
      7350
    ], this._mpegAudioV10SampleRateTable = [44100, 48e3, 32e3, 0], this._mpegAudioV20SampleRateTable = [22050, 24e3, 16e3, 0], this._mpegAudioV25SampleRateTable = [11025, 12e3, 8e3, 0], this._mpegAudioL1BitRateTable = [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1], this._mpegAudioL2BitRateTable = [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1], this._mpegAudioL3BitRateTable = [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], this._videoTrack = { type: "video", id: 1, sequenceNumber: 0, samples: [], length: 0 }, this._audioTrack = { type: "audio", id: 2, sequenceNumber: 0, samples: [], length: 0 }, this._littleEndian = function() {
      let r = new ArrayBuffer(2);
      return new DataView(r).setInt16(0, 256, !0), new Int16Array(r)[0] === 256;
    }();
  }
  destroy() {
    this._mediaInfo = null, this._metadata = null, this._audioMetadata = null, this._videoMetadata = null, this._videoTrack = null, this._audioTrack = null, this._onError = null, this._onMediaInfo = null, this._onMetaDataArrived = null, this._onScriptDataArrived = null, this._onTrackMetadata = null, this._onDataAvailable = null;
  }
  static probe(t) {
    let n = new Uint8Array(t), r = { match: !1 };
    if (n[0] !== 70 || n[1] !== 76 || n[2] !== 86 || n[3] !== 1)
      return r;
    let l = (n[4] & 4) >>> 2 !== 0, a = (n[4] & 1) !== 0, e = ReadBig32(n, 5);
    return e < 9 ? r : {
      match: !0,
      consumed: e,
      dataOffset: e,
      hasAudioTrack: l,
      hasVideoTrack: a
    };
  }
  bindDataSource(t) {
    return t.onDataArrival = this.parseChunks.bind(this), this;
  }
  // prototype: function(type: string, metadata: any): void
  get onTrackMetadata() {
    return this._onTrackMetadata;
  }
  set onTrackMetadata(t) {
    this._onTrackMetadata = t;
  }
  // prototype: function(mediaInfo: MediaInfo): void
  get onMediaInfo() {
    return this._onMediaInfo;
  }
  set onMediaInfo(t) {
    this._onMediaInfo = t;
  }
  get onMetaDataArrived() {
    return this._onMetaDataArrived;
  }
  set onMetaDataArrived(t) {
    this._onMetaDataArrived = t;
  }
  get onScriptDataArrived() {
    return this._onScriptDataArrived;
  }
  set onScriptDataArrived(t) {
    this._onScriptDataArrived = t;
  }
  // prototype: function(type: number, info: string): void
  get onError() {
    return this._onError;
  }
  set onError(t) {
    this._onError = t;
  }
  // prototype: function(videoTrack: any, audioTrack: any): void
  get onDataAvailable() {
    return this._onDataAvailable;
  }
  set onDataAvailable(t) {
    this._onDataAvailable = t;
  }
  // timestamp base for output samples, must be in milliseconds
  get timestampBase() {
    return this._timestampBase;
  }
  set timestampBase(t) {
    this._timestampBase = t;
  }
  get overridedDuration() {
    return this._duration;
  }
  // Force-override media duration. Must be in milliseconds, int32
  set overridedDuration(t) {
    this._durationOverrided = !0, this._duration = t, this._mediaInfo.duration = t;
  }
  // Force-override audio track present flag, boolean
  set overridedHasAudio(t) {
    this._hasAudioFlagOverrided = !0, this._hasAudio = t, this._mediaInfo.hasAudio = t;
  }
  // Force-override video track present flag, boolean
  set overridedHasVideo(t) {
    this._hasVideoFlagOverrided = !0, this._hasVideo = t, this._mediaInfo.hasVideo = t;
  }
  resetMediaInfo() {
    this._mediaInfo = new MediaInfo();
  }
  _isInitialMetadataDispatched() {
    return this._hasAudio && this._hasVideo ? this._audioInitialMetadataDispatched && this._videoInitialMetadataDispatched : this._hasAudio && !this._hasVideo ? this._audioInitialMetadataDispatched : !this._hasAudio && this._hasVideo ? this._videoInitialMetadataDispatched : !1;
  }
  // function parseChunks(chunk: ArrayBuffer, byteStart: number): number;
  parseChunks(t, n, r = "") {
    if (!this._onError || !this._onMediaInfo || !this._onTrackMetadata || !this._onDataAvailable)
      throw new IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");
    let l = 0, a = this._littleEndian;
    if (n === 0)
      if ((t == null ? void 0 : t.byteLength) > 13)
        l = FLVDemuxer.probe(t).dataOffset || 0;
      else
        return 0;
    for (this._firstParse && (this._firstParse = !1, n + l !== this._dataOffset && Log.w(this.TAG, "First time parsing but chunk byteStart invalid!"), new DataView(t, l).getUint32(0, !a) !== 0 && Log.w(this.TAG, "PrevTagSize0 !== 0 !!!"), l += 4); l < t.byteLength; ) {
      this._dispatch = !0;
      let e = new DataView(t, l);
      if (l + 11 + 4 > t.byteLength)
        break;
      let g = e.getUint8(0), _ = e.getUint32(0, !a) & 16777215;
      if (l + 11 + _ + 4 > t.byteLength)
        break;
      if (g !== 8 && g !== 9 && g !== 18) {
        Log.w(this.TAG, `Unsupported tag type ${g}, skipped`), l += 11 + _ + 4;
        continue;
      }
      let y = e.getUint8(4), x = e.getUint8(5), E = e.getUint8(6), C = e.getUint8(7), L = E | x << 8 | y << 16 | C << 24;
      (e.getUint32(7, !a) & 16777215) !== 0 && Log.w(this.TAG, "Meet tag which has StreamID != 0!");
      let I = l + 11;
      switch (g) {
        case 8:
          this._parseAudioData(t, I, _, L);
          break;
        case 9:
          this._parseVideoData(t, I, _, L, n + l);
          break;
        case 18:
          this._parseScriptData(t, I, _);
          break;
      }
      let D = e.getUint32(11 + _, !a);
      D !== 11 + _ && Log.w(this.TAG, `Invalid PrevTagSize ${D}`), l += 11 + _ + 4;
    }
    return this._isInitialMetadataDispatched() && this._dispatch && (this._audioTrack.length || this._videoTrack.length) && this._onDataAvailable(this._audioTrack, this._videoTrack), l;
  }
  _parseScriptData(t, n, r) {
    let l = AMF.parseScriptData(t, n, r);
    if (l.hasOwnProperty("onMetaData")) {
      if (l.onMetaData == null || typeof l.onMetaData != "object") {
        Log.w(this.TAG, "Invalid onMetaData structure!");
        return;
      }
      this._metadata && Log.w(this.TAG, "Found another onMetaData tag!"), this._metadata = l;
      let a = this._metadata.onMetaData;
      if (this._onMetaDataArrived && this._onMetaDataArrived(Object.assign({}, a)), typeof a.hasAudio == "boolean" && this._hasAudioFlagOverrided === !1 && (this._hasAudio = a.hasAudio, this._mediaInfo.hasAudio = this._hasAudio), typeof a.hasVideo == "boolean" && this._hasVideoFlagOverrided === !1 && (this._hasVideo = a.hasVideo, this._mediaInfo.hasVideo = this._hasVideo), typeof a.audiodatarate == "number" && (this._mediaInfo.audioDataRate = a.audiodatarate), typeof a.videodatarate == "number" && (this._mediaInfo.videoDataRate = a.videodatarate), typeof a.width == "number" && (this._mediaInfo.width = a.width), typeof a.height == "number" && (this._mediaInfo.height = a.height), typeof a.duration == "number") {
        if (!this._durationOverrided) {
          let e = Math.floor(a.duration * this._timescale);
          this._duration = e, this._mediaInfo.duration = e;
        }
      } else
        this._mediaInfo.duration = 0;
      if (typeof a.framerate == "number") {
        let e = Math.floor(a.framerate * 1e3);
        if (e > 0) {
          let g = e / 1e3;
          this._referenceFrameRate.fixed = !0, this._referenceFrameRate.fps = g, this._referenceFrameRate.fps_num = e, this._referenceFrameRate.fps_den = 1e3, this._mediaInfo.fps = g;
        }
      }
      if (typeof a.keyframes == "object") {
        this._mediaInfo.hasKeyframesIndex = !0;
        let e = a.keyframes;
        this._mediaInfo.keyframesIndex = this._parseKeyframesIndex(e), a.keyframes = null;
      } else
        this._mediaInfo.hasKeyframesIndex = !1;
      this._dispatch = !1, this._mediaInfo.metadata = a, Log.v(this.TAG, "Parsed onMetaData"), this._mediaInfo.isComplete() && this._onMediaInfo(this._mediaInfo);
    }
    Object.keys(l).length > 0 && this._onScriptDataArrived && this._onScriptDataArrived(Object.assign({}, l));
  }
  _parseKeyframesIndex(t) {
    let n = [], r = [];
    for (let l = 1; l < t.times.length; l++) {
      let a = this._timestampBase + Math.floor(t.times[l] * 1e3);
      n.push(a), r.push(t.filepositions[l]);
    }
    return {
      times: n,
      filepositions: r
    };
  }
  _parseAudioData(t, n, r, l) {
    if (r <= 1) {
      Log.w(this.TAG, "Flv: Invalid audio packet, missing SoundData payload!");
      return;
    }
    if (this._hasAudioFlagOverrided === !0 && this._hasAudio === !1)
      return;
    this._littleEndian;
    let e = new DataView(t, n, r).getUint8(0), g = e >>> 4;
    if (g !== 2 && g !== 10) {
      this._onError(DemuxErrors.CODEC_UNSUPPORTED, "Flv: Unsupported audio codec idx: " + g);
      return;
    }
    let _ = 0, y = (e & 12) >>> 2;
    if (y >= 0 && y <= 4)
      _ = this._flvSoundRateTable[y];
    else {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: Invalid audio sample rate idx: " + y);
      return;
    }
    let x = e & 1, E = this._audioMetadata, C = this._audioTrack;
    if (E || (this._hasAudio === !1 && this._hasAudioFlagOverrided === !1 && (this._hasAudio = !0, this._mediaInfo.hasAudio = !0), E = this._audioMetadata = {}, E.type = "audio", E.id = C.id, E.timescale = this._timescale, E.duration = this._duration, E.audioSampleRate = _, E.channelCount = x === 0 ? 1 : 2), g === 10) {
      let L = this._parseAACAudioData(t, n + 1, r - 1);
      if (L == null)
        return;
      if (L.packetType === 0) {
        E.config && Log.w(this.TAG, "Found another AudioSpecificConfig!");
        let A = L.data;
        E.audioSampleRate = A.samplingRate, E.channelCount = A.channelCount, E.codec = A.codec, E.originalCodec = A.originalCodec, E.config = A.config, E.configRaw = A.configRaw, E.audioObjectType = A.audioObjectType, E.samplingFrequencyIndex = A.samplingIndex, E.channelConfig = A.channelCount, E.refSampleDuration = 1024 / E.audioSampleRate * E.timescale, Log.v(this.TAG, "Parsed AudioSpecificConfig"), this._isInitialMetadataDispatched() ? this._dispatch && (this._audioTrack.length || this._videoTrack.length) && this._onDataAvailable(this._audioTrack, this._videoTrack) : this._audioInitialMetadataDispatched = !0, this._dispatch = !1, this._onTrackMetadata("audio", E);
        let I = this._mediaInfo;
        I.audioCodec = E.originalCodec, I.audioSampleRate = E.audioSampleRate, I.audioChannelCount = E.channelCount, I.hasVideo ? I.videoCodec != null && (I.mimeType = 'video/x-flv; codecs="' + I.videoCodec + "," + I.audioCodec + '"') : I.mimeType = 'video/x-flv; codecs="' + I.audioCodec + '"', I.isComplete() && this._onMediaInfo(I);
      } else if (L.packetType === 1) {
        let A = this._timestampBase + l, I = { unit: L.data, length: L.data.byteLength, dts: A, pts: A };
        C.samples.push(I), C.length += L.data.length;
      } else
        Log.e(this.TAG, `Flv: Unsupported AAC data type ${L.packetType}`);
    } else if (g === 2) {
      if (!E.codec) {
        let D = this._parseMP3AudioData(t, n + 1, r - 1, !0);
        if (D == null)
          return;
        E.audioSampleRate = D.samplingRate, E.channelCount = D.channelCount, E.codec = D.codec, E.originalCodec = D.originalCodec, E.refSampleDuration = 1152 / E.audioSampleRate * E.timescale, Log.v(this.TAG, "Parsed MPEG Audio Frame Header"), this._audioInitialMetadataDispatched = !0, this._onTrackMetadata("audio", E);
        let w = this._mediaInfo;
        w.audioCodec = E.codec, w.audioSampleRate = E.audioSampleRate, w.audioChannelCount = E.channelCount, w.audioDataRate = D.bitRate, w.hasVideo ? w.videoCodec != null && (w.mimeType = 'video/x-flv; codecs="' + w.videoCodec + "," + w.audioCodec + '"') : w.mimeType = 'video/x-flv; codecs="' + w.audioCodec + '"', w.isComplete() && this._onMediaInfo(w);
      }
      let L = this._parseMP3AudioData(t, n + 1, r - 1, !1);
      if (L == null)
        return;
      let A = this._timestampBase + l, I = { unit: L, length: L.byteLength, dts: A, pts: A };
      C.samples.push(I), C.length += L.length;
    }
  }
  _parseAACAudioData(t, n, r) {
    if (r <= 1) {
      Log.w(this.TAG, "Flv: Invalid AAC packet, missing AACPacketType or/and Data!");
      return;
    }
    let l = {}, a = new Uint8Array(t, n, r);
    return l.packetType = a[0], a[0] === 0 ? l.data = this._parseAACAudioSpecificConfig(t, n + 1, r - 1) : l.data = a.subarray(1), l;
  }
  _parseAACAudioSpecificConfig(t, n, r) {
    let l = new Uint8Array(t, n, r), a = null, e = 0, g = 0, _ = 0, y = null;
    if (e = g = l[0] >>> 3, _ = (l[0] & 7) << 1 | l[1] >>> 7, _ < 0 || _ >= this._mpegSamplingRates.length) {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: AAC invalid sampling frequency index!");
      return;
    }
    let x = this._mpegSamplingRates[_], E = (l[1] & 120) >>> 3;
    if (E < 0 || E >= 8) {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: AAC invalid channel configuration");
      return;
    }
    e === 5 && (y = (l[1] & 7) << 1 | l[2] >>> 7, (l[2] & 124) >>> 2);
    let C = self.navigator.userAgent.toLowerCase();
    return C.indexOf("firefox") !== -1 ? _ >= 6 ? (e = 5, a = new Array(4), y = _ - 3) : (e = 2, a = new Array(2), y = _) : C.indexOf("android") !== -1 ? (e = 2, a = new Array(2), y = _) : (e = 5, y = _, a = new Array(4), _ >= 6 ? y = _ - 3 : E === 1 && (e = 2, a = new Array(2), y = _)), a[0] = e << 3, a[0] |= (_ & 15) >>> 1, a[1] = (_ & 15) << 7, a[1] |= (E & 15) << 3, e === 5 && (a[1] |= (y & 15) >>> 1, a[2] = (y & 1) << 7, a[2] |= 8, a[3] = 0), {
      config: a,
      samplingRate: x,
      channelCount: E,
      codec: "mp4a.40." + e,
      originalCodec: "mp4a.40." + g
    };
  }
  _parseMP3AudioData(t, n, r, l) {
    if (r < 4) {
      Log.w(this.TAG, "Flv: Invalid MP3 packet, header missing!");
      return;
    }
    this._littleEndian;
    let a = new Uint8Array(t, n, r), e = null;
    if (l) {
      if (a[0] !== 255)
        return;
      let g = a[1] >>> 3 & 3, _ = (a[1] & 6) >> 1, y = (a[2] & 240) >>> 4, x = (a[2] & 12) >>> 2, C = (a[3] >>> 6 & 3) !== 3 ? 2 : 1, L = 0, A = 0, I = "mp3";
      switch (g) {
        case 0:
          L = this._mpegAudioV25SampleRateTable[x];
          break;
        case 2:
          L = this._mpegAudioV20SampleRateTable[x];
          break;
        case 3:
          L = this._mpegAudioV10SampleRateTable[x];
          break;
      }
      switch (_) {
        case 1:
          y < this._mpegAudioL3BitRateTable.length && (A = this._mpegAudioL3BitRateTable[y]);
          break;
        case 2:
          y < this._mpegAudioL2BitRateTable.length && (A = this._mpegAudioL2BitRateTable[y]);
          break;
        case 3:
          y < this._mpegAudioL1BitRateTable.length && (A = this._mpegAudioL1BitRateTable[y]);
          break;
      }
      e = {
        bitRate: A,
        samplingRate: L,
        channelCount: C,
        codec: I,
        originalCodec: I
      };
    } else
      e = a;
    return e;
  }
  _parseVideoData(t, n, r, l, a) {
    if (r <= 1) {
      Log.w(this.TAG, "Flv: Invalid video packet, missing VideoData payload!");
      return;
    }
    if (this._hasVideoFlagOverrided === !0 && this._hasVideo === !1)
      return;
    let e = new Uint8Array(t, n, r)[0], g = (e & 240) >>> 4, _ = e & 15;
    if (_ !== 7) {
      this._onError(DemuxErrors.CODEC_UNSUPPORTED, `Flv: Unsupported codec in video frame: ${_}`);
      return;
    }
    this._parseAVCVideoPacket(t, n + 1, r - 1, l, a, g);
  }
  _parseAVCVideoPacket(t, n, r, l, a, e) {
    if (r < 4) {
      Log.w(this.TAG, "Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");
      return;
    }
    let g = this._littleEndian, _ = new DataView(t, n, r), y = _.getUint8(0), E = (_.getUint32(0, !g) & 16777215) << 8 >> 8;
    if (y === 0)
      this._parseAVCDecoderConfigurationRecord(t, n + 4, r - 4);
    else if (y === 1)
      this._parseAVCVideoData(t, n + 4, r - 4, l, a, e, E);
    else if (y !== 2) {
      this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Invalid video packet type ${y}`);
      return;
    }
  }
  _parseAVCDecoderConfigurationRecord(t, n, r) {
    if (r < 7) {
      Log.w(this.TAG, "Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");
      return;
    }
    let l = this._videoMetadata, a = this._videoTrack, e = this._littleEndian, g = new DataView(t, n, r);
    l ? typeof l.avcc < "u" && Log.w(this.TAG, "Found another AVCDecoderConfigurationRecord!") : (this._hasVideo === !1 && this._hasVideoFlagOverrided === !1 && (this._hasVideo = !0, this._mediaInfo.hasVideo = !0), l = this._videoMetadata = {}, l.type = "video", l.id = a.id, l.timescale = this._timescale, l.duration = this._duration);
    let _ = g.getUint8(0), y = g.getUint8(1);
    if (g.getUint8(2), g.getUint8(3), _ !== 1 || y === 0) {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord");
      return;
    }
    if (this._naluLengthSize = (g.getUint8(4) & 3) + 1, this._naluLengthSize !== 3 && this._naluLengthSize !== 4) {
      this._onError(DemuxErrors.FORMAT_ERROR, `Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize - 1}`);
      return;
    }
    let x = g.getUint8(5) & 31;
    if (x === 0) {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No SPS");
      return;
    } else
      x > 1 && Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${x}`);
    let E = 6;
    for (let L = 0; L < x; L++) {
      let A = g.getUint16(E, !e);
      if (E += 2, A === 0)
        continue;
      let I = new Uint8Array(t, n + E, A);
      E += A;
      let D = SPSParser.parseSPS(I);
      if (L !== 0)
        continue;
      l.codecWidth = D.codec_size.width, l.codecHeight = D.codec_size.height, l.presentWidth = D.present_size.width, l.presentHeight = D.present_size.height, l.profile = D.profile_string, l.level = D.level_string, l.bitDepth = D.bit_depth, l.chromaFormat = D.chroma_format, l.sarRatio = D.sar_ratio, l.frameRate = D.frame_rate, (D.frame_rate.fixed === !1 || D.frame_rate.fps_num === 0 || D.frame_rate.fps_den === 0) && (l.frameRate = this._referenceFrameRate);
      let w = l.frameRate.fps_den, S = l.frameRate.fps_num;
      l.refSampleDuration = l.timescale * (w / S);
      let O = I.subarray(1, 4), F = "avc1.";
      for (let P = 0; P < 3; P++) {
        let $ = O[P].toString(16);
        $.length < 2 && ($ = "0" + $), F += $;
      }
      l.codec = F;
      let j = this._mediaInfo;
      j.width = l.codecWidth, j.height = l.codecHeight, j.fps = l.frameRate.fps, j.profile = l.profile, j.level = l.level, j.refFrames = D.ref_frames, j.chromaFormat = D.chroma_format_string, j.sarNum = l.sarRatio.width, j.sarDen = l.sarRatio.height, j.videoCodec = F, j.hasAudio ? j.audioCodec != null && (j.mimeType = 'video/x-flv; codecs="' + j.videoCodec + "," + j.audioCodec + '"') : j.mimeType = 'video/x-flv; codecs="' + j.videoCodec + '"', j.isComplete() && this._onMediaInfo(j);
    }
    let C = g.getUint8(E);
    if (C === 0) {
      this._onError(DemuxErrors.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No PPS");
      return;
    } else
      C > 1 && Log.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${C}`);
    E++;
    for (let L = 0; L < C; L++) {
      let A = g.getUint16(E, !e);
      E += 2, A !== 0 && (E += A);
    }
    l.avcc = new Uint8Array(r), l.avcc.set(new Uint8Array(t, n, r), 0), Log.v(this.TAG, "Parsed AVCDecoderConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && (this._audioTrack.length || this._videoTrack.length) && this._onDataAvailable(this._audioTrack, this._videoTrack) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, this._onTrackMetadata("video", l);
  }
  _parseAVCVideoData(t, n, r, l, a, e, g) {
    let _ = this._littleEndian, y = new DataView(t, n, r), x = [], E = 0, C = 0;
    const L = this._naluLengthSize;
    let A = this._timestampBase + l, I = e === 1;
    for (; C < r; ) {
      if (C + 4 >= r) {
        Log.w(this.TAG, `Malformed Nalu near timestamp ${A}, offset = ${C}, dataSize = ${r}`);
        break;
      }
      let D = y.getUint32(C, !_);
      if (L === 3 && (D >>>= 8), D > r - L) {
        Log.w(this.TAG, `Malformed Nalus near timestamp ${A}, NaluSize > DataSize!`);
        return;
      }
      let w = y.getUint8(C + L) & 31;
      w === 5 && (I = !0);
      let S = new Uint8Array(t, n + C, L + D), O = { type: w, data: S };
      x.push(O), E += S.byteLength, C += L + D;
    }
    if (x.length) {
      let D = this._videoTrack, w = {
        units: x,
        length: E,
        isKeyframe: I,
        dts: A,
        cts: g,
        pts: A + g
      };
      I && (w.fileposition = a), D.samples.push(w), D.length += E;
    }
  }
}
class MP4 {
  static init() {
    MP4.types = {
      avc1: [],
      avcC: [],
      btrt: [],
      dinf: [],
      dref: [],
      esds: [],
      ftyp: [],
      hdlr: [],
      mdat: [],
      mdhd: [],
      mdia: [],
      mfhd: [],
      minf: [],
      moof: [],
      moov: [],
      mp4a: [],
      mvex: [],
      mvhd: [],
      sdtp: [],
      stbl: [],
      stco: [],
      stsc: [],
      stsd: [],
      stsz: [],
      stts: [],
      tfdt: [],
      tfhd: [],
      traf: [],
      trak: [],
      trun: [],
      trex: [],
      tkhd: [],
      vmhd: [],
      smhd: [],
      ".mp3": []
    };
    for (let n in MP4.types)
      MP4.types.hasOwnProperty(n) && (MP4.types[n] = [
        n.charCodeAt(0),
        n.charCodeAt(1),
        n.charCodeAt(2),
        n.charCodeAt(3)
      ]);
    let t = MP4.constants = {};
    t.FTYP = new Uint8Array([
      105,
      115,
      111,
      109,
      // major_brand: isom
      0,
      0,
      0,
      1,
      // minor_version: 0x01
      105,
      115,
      111,
      109,
      // isom
      97,
      118,
      99,
      49
      // avc1
    ]), t.STSD_PREFIX = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      1
      // entry_count
    ]), t.STTS = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0
      // entry_count
    ]), t.STSC = t.STCO = t.STTS, t.STSZ = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // sample_size
      0,
      0,
      0,
      0
      // sample_count
    ]), t.HDLR_VIDEO = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // pre_defined
      118,
      105,
      100,
      101,
      // handler_type: 'vide'
      0,
      0,
      0,
      0,
      // reserved: 3 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      86,
      105,
      100,
      101,
      111,
      72,
      97,
      110,
      100,
      108,
      101,
      114,
      0
      // name: VideoHandler
    ]), t.HDLR_AUDIO = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // pre_defined
      115,
      111,
      117,
      110,
      // handler_type: 'soun'
      0,
      0,
      0,
      0,
      // reserved: 3 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      83,
      111,
      117,
      110,
      100,
      72,
      97,
      110,
      100,
      108,
      101,
      114,
      0
      // name: SoundHandler
    ]), t.DREF = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      1,
      // entry_count
      0,
      0,
      0,
      12,
      // entry_size
      117,
      114,
      108,
      32,
      // type 'url '
      0,
      0,
      0,
      1
      // version(0) + flags
    ]), t.SMHD = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0
      // balance(2) + reserved(2)
    ]), t.VMHD = new Uint8Array([
      0,
      0,
      0,
      1,
      // version(0) + flags
      0,
      0,
      // graphicsmode: 2 bytes
      0,
      0,
      0,
      0,
      // opcolor: 3 * 2 bytes
      0,
      0
    ]);
  }
  // Generate a box
  static box(t) {
    let n = 8, r = null, l = Array.prototype.slice.call(arguments, 1), a = l.length;
    for (let g = 0; g < a; g++)
      n += l[g].byteLength;
    r = new Uint8Array(n), r[0] = n >>> 24 & 255, r[1] = n >>> 16 & 255, r[2] = n >>> 8 & 255, r[3] = n & 255, r.set(t, 4);
    let e = 8;
    for (let g = 0; g < a; g++)
      r.set(l[g], e), e += l[g].byteLength;
    return r;
  }
  // emit ftyp & moov
  static generateInitSegment(t) {
    let n = MP4.box(MP4.types.ftyp, MP4.constants.FTYP), r = MP4.moov(t), l = new Uint8Array(n.byteLength + r.byteLength);
    return l.set(n, 0), l.set(r, n.byteLength), l;
  }
  // Movie metadata box
  static moov(t) {
    let n = MP4.mvhd(t.timescale, t.duration), r = MP4.trak(t), l = MP4.mvex(t);
    return MP4.box(MP4.types.moov, n, r, l);
  }
  // Movie header box
  static mvhd(t, n) {
    return MP4.box(MP4.types.mvhd, new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // creation_time
      0,
      0,
      0,
      0,
      // modification_time
      t >>> 24 & 255,
      // timescale: 4 bytes
      t >>> 16 & 255,
      t >>> 8 & 255,
      t & 255,
      n >>> 24 & 255,
      // duration: 4 bytes
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255,
      0,
      1,
      0,
      0,
      // Preferred rate: 1.0
      1,
      0,
      0,
      0,
      // PreferredVolume(1.0, 2bytes) + reserved(2bytes)
      0,
      0,
      0,
      0,
      // reserved: 4 + 4 bytes
      0,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      // ----begin composition matrix----
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      64,
      0,
      0,
      0,
      // ----end composition matrix----
      0,
      0,
      0,
      0,
      // ----begin pre_defined 6 * 4 bytes----
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // ----end pre_defined 6 * 4 bytes----
      255,
      255,
      255,
      255
      // next_track_ID
    ]));
  }
  // Track box
  static trak(t) {
    return MP4.box(MP4.types.trak, MP4.tkhd(t), MP4.mdia(t));
  }
  // Track header box
  static tkhd(t) {
    let n = t.id, r = t.duration, l = t.presentWidth, a = t.presentHeight;
    return MP4.box(MP4.types.tkhd, new Uint8Array([
      0,
      0,
      0,
      7,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // creation_time
      0,
      0,
      0,
      0,
      // modification_time
      n >>> 24 & 255,
      // track_ID: 4 bytes
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255,
      0,
      0,
      0,
      0,
      // reserved: 4 bytes
      r >>> 24 & 255,
      // duration: 4 bytes
      r >>> 16 & 255,
      r >>> 8 & 255,
      r & 255,
      0,
      0,
      0,
      0,
      // reserved: 2 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      // layer(2bytes) + alternate_group(2bytes)
      0,
      0,
      0,
      0,
      // volume(2bytes) + reserved(2bytes)
      0,
      1,
      0,
      0,
      // ----begin composition matrix----
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      64,
      0,
      0,
      0,
      // ----end composition matrix----
      l >>> 8 & 255,
      // width and height
      l & 255,
      0,
      0,
      a >>> 8 & 255,
      a & 255,
      0,
      0
    ]));
  }
  // Media Box
  static mdia(t) {
    return MP4.box(MP4.types.mdia, MP4.mdhd(t), MP4.hdlr(t), MP4.minf(t));
  }
  // Media header box
  static mdhd(t) {
    let n = t.timescale, r = t.duration;
    return MP4.box(MP4.types.mdhd, new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      0,
      0,
      0,
      0,
      // creation_time
      0,
      0,
      0,
      0,
      // modification_time
      n >>> 24 & 255,
      // timescale: 4 bytes
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255,
      r >>> 24 & 255,
      // duration: 4 bytes
      r >>> 16 & 255,
      r >>> 8 & 255,
      r & 255,
      85,
      196,
      // language: und (undetermined)
      0,
      0
      // pre_defined = 0
    ]));
  }
  // Media handler reference box
  static hdlr(t) {
    let n = null;
    return t.type === "audio" ? n = MP4.constants.HDLR_AUDIO : n = MP4.constants.HDLR_VIDEO, MP4.box(MP4.types.hdlr, n);
  }
  // Media infomation box
  static minf(t) {
    let n = null;
    return t.type === "audio" ? n = MP4.box(MP4.types.smhd, MP4.constants.SMHD) : n = MP4.box(MP4.types.vmhd, MP4.constants.VMHD), MP4.box(MP4.types.minf, n, MP4.dinf(), MP4.stbl(t));
  }
  // Data infomation box
  static dinf() {
    return MP4.box(
      MP4.types.dinf,
      MP4.box(MP4.types.dref, MP4.constants.DREF)
    );
  }
  // Sample table box
  static stbl(t) {
    return MP4.box(
      MP4.types.stbl,
      // type: stbl
      MP4.stsd(t),
      // Sample Description Table
      MP4.box(MP4.types.stts, MP4.constants.STTS),
      // Time-To-Sample
      MP4.box(MP4.types.stsc, MP4.constants.STSC),
      // Sample-To-Chunk
      MP4.box(MP4.types.stsz, MP4.constants.STSZ),
      // Sample size
      MP4.box(MP4.types.stco, MP4.constants.STCO)
      // Chunk offset
    );
  }
  // Sample description box
  static stsd(t) {
    return t.type === "audio" ? t.codec === "mp3" ? MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp3(t)) : MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp4a(t)) : MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.avc1(t));
  }
  static mp3(t) {
    let n = t.channelCount, r = t.audioSampleRate, l = new Uint8Array([
      0,
      0,
      0,
      0,
      // reserved(4)
      0,
      0,
      0,
      1,
      // reserved(2) + data_reference_index(2)
      0,
      0,
      0,
      0,
      // reserved: 2 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      n,
      // channelCount(2)
      0,
      16,
      // sampleSize(2)
      0,
      0,
      0,
      0,
      // reserved(4)
      r >>> 8 & 255,
      // Audio sample rate
      r & 255,
      0,
      0
    ]);
    return MP4.box(MP4.types[".mp3"], l);
  }
  static mp4a(t) {
    let n = t.channelCount, r = t.audioSampleRate, l = new Uint8Array([
      0,
      0,
      0,
      0,
      // reserved(4)
      0,
      0,
      0,
      1,
      // reserved(2) + data_reference_index(2)
      0,
      0,
      0,
      0,
      // reserved: 2 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      n,
      // channelCount(2)
      0,
      16,
      // sampleSize(2)
      0,
      0,
      0,
      0,
      // reserved(4)
      r >>> 8 & 255,
      // Audio sample rate
      r & 255,
      0,
      0
    ]);
    return MP4.box(MP4.types.mp4a, l, MP4.esds(t));
  }
  static esds(t) {
    let n = t.config || [], r = n.length, l = new Uint8Array([
      0,
      0,
      0,
      0,
      // version 0 + flags
      3,
      // descriptor_type
      23 + r,
      // length3
      0,
      1,
      // es_id
      0,
      // stream_priority
      4,
      // descriptor_type
      15 + r,
      // length
      64,
      // codec: mpeg4_audio
      21,
      // stream_type: Audio
      0,
      0,
      0,
      // buffer_size
      0,
      0,
      0,
      0,
      // maxBitrate
      0,
      0,
      0,
      0,
      // avgBitrate
      5
      // descriptor_type
    ].concat([
      r
    ]).concat(
      n
    ).concat([
      6,
      1,
      2
      // GASpecificConfig
    ]));
    return MP4.box(MP4.types.esds, l);
  }
  static avc1(t) {
    let n = t.avcc, r = t.codecWidth, l = t.codecHeight, a = new Uint8Array([
      0,
      0,
      0,
      0,
      // reserved(4)
      0,
      0,
      0,
      1,
      // reserved(2) + data_reference_index(2)
      0,
      0,
      0,
      0,
      // pre_defined(2) + reserved(2)
      0,
      0,
      0,
      0,
      // pre_defined: 3 * 4 bytes
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      r >>> 8 & 255,
      // width: 2 bytes
      r & 255,
      l >>> 8 & 255,
      // height: 2 bytes
      l & 255,
      0,
      72,
      0,
      0,
      // horizresolution: 4 bytes
      0,
      72,
      0,
      0,
      // vertresolution: 4 bytes
      0,
      0,
      0,
      0,
      // reserved: 4 bytes
      0,
      1,
      // frame_count
      10,
      // strlen
      120,
      113,
      113,
      47,
      // compressorname: 32 bytes
      102,
      108,
      118,
      46,
      106,
      115,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      24,
      // depth
      255,
      255
      // pre_defined = -1
    ]);
    return MP4.box(MP4.types.avc1, a, MP4.box(MP4.types.avcC, n));
  }
  // Movie Extends box
  static mvex(t) {
    return MP4.box(MP4.types.mvex, MP4.trex(t));
  }
  // Track Extends box
  static trex(t) {
    let n = t.id, r = new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) + flags
      n >>> 24 & 255,
      // track_ID
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255,
      0,
      0,
      0,
      1,
      // default_sample_description_index
      0,
      0,
      0,
      0,
      // default_sample_duration
      0,
      0,
      0,
      0,
      // default_sample_size
      0,
      1,
      0,
      1
      // default_sample_flags
    ]);
    return MP4.box(MP4.types.trex, r);
  }
  // Movie fragment box
  static moof(t, n) {
    return MP4.box(MP4.types.moof, MP4.mfhd(t.sequenceNumber), MP4.traf(t, n));
  }
  static mfhd(t) {
    let n = new Uint8Array([
      0,
      0,
      0,
      0,
      t >>> 24 & 255,
      // sequence_number: int32
      t >>> 16 & 255,
      t >>> 8 & 255,
      t & 255
    ]);
    return MP4.box(MP4.types.mfhd, n);
  }
  // Track fragment box
  static traf(t, n) {
    let r = t.id, l = MP4.box(MP4.types.tfhd, new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) & flags
      r >>> 24 & 255,
      // track_ID
      r >>> 16 & 255,
      r >>> 8 & 255,
      r & 255
    ])), a = MP4.box(MP4.types.tfdt, new Uint8Array([
      0,
      0,
      0,
      0,
      // version(0) & flags
      n >>> 24 & 255,
      // baseMediaDecodeTime: int32
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255
    ])), e = MP4.sdtp(t), g = MP4.trun(t, e.byteLength + 16 + 16 + 8 + 16 + 8 + 8);
    return MP4.box(MP4.types.traf, l, a, g, e);
  }
  // Sample Dependency Type box
  static sdtp(t) {
    let n = t.samples || [], r = n.length, l = new Uint8Array(4 + r);
    for (let a = 0; a < r; a++) {
      let e = n[a].flags;
      l[a + 4] = e.isLeading << 6 | e.dependsOn << 4 | e.isDependedOn << 2 | e.hasRedundancy;
    }
    return MP4.box(MP4.types.sdtp, l);
  }
  // Track fragment run box
  static trun(t, n) {
    let r = t.samples || [], l = r.length, a = 12 + 16 * l, e = new Uint8Array(a);
    n += 8 + a, e.set([
      0,
      0,
      15,
      1,
      // version(0) & flags
      l >>> 24 & 255,
      // sample_count
      l >>> 16 & 255,
      l >>> 8 & 255,
      l & 255,
      n >>> 24 & 255,
      // data_offset
      n >>> 16 & 255,
      n >>> 8 & 255,
      n & 255
    ], 0);
    for (let g = 0; g < l; g++) {
      let _ = r[g].duration, y = r[g].size, x = r[g].flags, E = r[g].cts;
      e.set([
        _ >>> 24 & 255,
        // sample_duration
        _ >>> 16 & 255,
        _ >>> 8 & 255,
        _ & 255,
        y >>> 24 & 255,
        // sample_size
        y >>> 16 & 255,
        y >>> 8 & 255,
        y & 255,
        x.isLeading << 2 | x.dependsOn,
        // sample_flags
        x.isDependedOn << 6 | x.hasRedundancy << 4 | x.isNonSync,
        0,
        0,
        // sample_degradation_priority
        E >>> 24 & 255,
        // sample_composition_time_offset
        E >>> 16 & 255,
        E >>> 8 & 255,
        E & 255
      ], 12 + 16 * g);
    }
    return MP4.box(MP4.types.trun, e);
  }
  static mdat(t) {
    return MP4.box(MP4.types.mdat, t);
  }
}
MP4.init();
class AAC {
  static getSilentFrame(t, n) {
    if (t === "mp4a.40.2") {
      if (n === 1)
        return new Uint8Array([0, 200, 0, 128, 35, 128]);
      if (n === 2)
        return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
      if (n === 3)
        return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142]);
      if (n === 4)
        return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128, 8, 2, 56]);
      if (n === 5)
        return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 56]);
      if (n === 6)
        return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224]);
    } else {
      if (n === 1)
        return new Uint8Array([1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6, 241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
      if (n === 2)
        return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
      if (n === 3)
        return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
    }
    return null;
  }
}
class SampleInfo {
  constructor(t, n, r, l, a) {
    this.dts = t, this.pts = n, this.duration = r, this.originalDts = l, this.isSyncPoint = a, this.fileposition = null;
  }
}
class MediaSegmentInfo {
  constructor() {
    this.beginDts = 0, this.endDts = 0, this.beginPts = 0, this.endPts = 0, this.originalBeginDts = 0, this.originalEndDts = 0, this.syncPoints = [], this.firstSample = null, this.lastSample = null;
  }
  appendSyncPoint(t) {
    t.isSyncPoint = !0, this.syncPoints.push(t);
  }
}
class IDRSampleList {
  constructor() {
    this._list = [];
  }
  clear() {
    this._list = [];
  }
  appendArray(t) {
    let n = this._list;
    t.length !== 0 && (n.length > 0 && t[0].originalDts < n[n.length - 1].originalDts && this.clear(), Array.prototype.push.apply(n, t));
  }
  getLastSyncPointBeforeDts(t) {
    if (this._list.length == 0)
      return null;
    let n = this._list, r = 0, l = n.length - 1, a = 0, e = 0, g = l;
    for (t < n[0].dts && (r = 0, e = g + 1); e <= g; )
      if (a = e + Math.floor((g - e) / 2), a === l || t >= n[a].dts && t < n[a + 1].dts) {
        r = a;
        break;
      } else
        n[a].dts < t ? e = a + 1 : g = a - 1;
    return this._list[r];
  }
}
class MediaSegmentInfoList {
  constructor(t) {
    this._type = t, this._list = [], this._lastAppendLocation = -1;
  }
  get type() {
    return this._type;
  }
  get length() {
    return this._list.length;
  }
  isEmpty() {
    return this._list.length === 0;
  }
  clear() {
    this._list = [], this._lastAppendLocation = -1;
  }
  _searchNearestSegmentBefore(t) {
    let n = this._list;
    if (n.length === 0)
      return -2;
    let r = n.length - 1, l = 0, a = 0, e = r, g = 0;
    if (t < n[0].originalBeginDts)
      return g = -1, g;
    for (; a <= e; )
      if (l = a + Math.floor((e - a) / 2), l === r || t > n[l].lastSample.originalDts && t < n[l + 1].originalBeginDts) {
        g = l;
        break;
      } else
        n[l].originalBeginDts < t ? a = l + 1 : e = l - 1;
    return g;
  }
  _searchNearestSegmentAfter(t) {
    return this._searchNearestSegmentBefore(t) + 1;
  }
  append(t) {
    let n = this._list, r = t, l = this._lastAppendLocation, a = 0;
    l !== -1 && l < n.length && r.originalBeginDts >= n[l].lastSample.originalDts && (l === n.length - 1 || l < n.length - 1 && r.originalBeginDts < n[l + 1].originalBeginDts) ? a = l + 1 : n.length > 0 && (a = this._searchNearestSegmentBefore(r.originalBeginDts) + 1), this._lastAppendLocation = a, this._list.splice(a, 0, r);
  }
  getLastSegmentBefore(t) {
    let n = this._searchNearestSegmentBefore(t);
    return n >= 0 ? this._list[n] : null;
  }
  getLastSampleBefore(t) {
    let n = this.getLastSegmentBefore(t);
    return n != null ? n.lastSample : null;
  }
  getLastSyncPointBefore(t) {
    let n = this._searchNearestSegmentBefore(t), r = this._list[n].syncPoints;
    for (; r.length === 0 && n > 0; )
      n--, r = this._list[n].syncPoints;
    return r.length > 0 ? r[r.length - 1] : null;
  }
}
class MP4Remuxer {
  constructor(t) {
    this.TAG = "MP4Remuxer", this._config = t, this._isLive = t.isLive === !0, this._dtsBase = -1, this._dtsBaseInited = !1, this._audioDtsBase = 1 / 0, this._videoDtsBase = 1 / 0, this._audioNextDts = void 0, this._videoNextDts = void 0, this._audioStashedLastSample = null, this._videoStashedLastSample = null, this._audioMeta = null, this._videoMeta = null, this._audioSegmentInfoList = new MediaSegmentInfoList("audio"), this._videoSegmentInfoList = new MediaSegmentInfoList("video"), this._onInitSegment = null, this._onMediaSegment = null, this._forceFirstIDR = !!(Browser.chrome && (Browser.version.major < 50 || Browser.version.major === 50 && Browser.version.build < 2661)), this._fillSilentAfterSeek = Browser.msedge || Browser.msie, this._mp3UseMpegAudio = !Browser.firefox, this._fillAudioTimestampGap = this._config.fixAudioTimestampGap;
  }
  destroy() {
    this._dtsBase = -1, this._dtsBaseInited = !1, this._audioMeta = null, this._videoMeta = null, this._audioSegmentInfoList.clear(), this._audioSegmentInfoList = null, this._videoSegmentInfoList.clear(), this._videoSegmentInfoList = null, this._onInitSegment = null, this._onMediaSegment = null;
  }
  bindDataSource(t) {
    return t.onDataAvailable = this.remux.bind(this), t.onTrackMetadata = this._onTrackMetadataReceived.bind(this), this;
  }
  /* prototype: function onInitSegment(type: string, initSegment: ArrayBuffer): void
     InitSegment: {
         type: string,
         data: ArrayBuffer,
         codec: string,
         container: string
     }
  */
  get onInitSegment() {
    return this._onInitSegment;
  }
  set onInitSegment(t) {
    this._onInitSegment = t;
  }
  /* prototype: function onMediaSegment(type: string, mediaSegment: MediaSegment): void
     MediaSegment: {
         type: string,
         data: ArrayBuffer,
         sampleCount: int32
         info: MediaSegmentInfo
     }
  */
  get onMediaSegment() {
    return this._onMediaSegment;
  }
  set onMediaSegment(t) {
    this._onMediaSegment = t;
  }
  insertDiscontinuity() {
    this._audioNextDts = this._videoNextDts = void 0;
  }
  seek(t) {
    this._audioStashedLastSample = null, this._videoStashedLastSample = null, this._videoSegmentInfoList.clear(), this._audioSegmentInfoList.clear();
  }
  remux(t, n) {
    if (!this._onMediaSegment)
      throw new IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");
    this._dtsBaseInited || this._calculateDtsBase(t, n), this._remuxVideo(n), this._remuxAudio(t);
  }
  _onTrackMetadataReceived(t, n) {
    let r = null, l = "mp4", a = n.codec;
    if (t === "audio")
      this._audioMeta = n, n.codec === "mp3" && this._mp3UseMpegAudio ? (l = "mpeg", a = "", r = new Uint8Array()) : r = MP4.generateInitSegment(n);
    else if (t === "video")
      this._videoMeta = n, r = MP4.generateInitSegment(n);
    else
      return;
    if (!this._onInitSegment)
      throw new IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");
    this._onInitSegment(t, {
      type: t,
      data: r.buffer,
      codec: a,
      container: `${t}/${l}`,
      mediaDuration: n.duration
      // in timescale 1000 (milliseconds)
    });
  }
  _calculateDtsBase(t, n) {
    this._dtsBaseInited || (t.samples && t.samples.length && (this._audioDtsBase = t.samples[0].dts), n.samples && n.samples.length && (this._videoDtsBase = n.samples[0].dts), this._dtsBase = Math.min(this._audioDtsBase, this._videoDtsBase), this._dtsBaseInited = !0);
  }
  flushStashedSamples() {
    let t = this._videoStashedLastSample, n = this._audioStashedLastSample, r = {
      type: "video",
      id: 1,
      sequenceNumber: 0,
      samples: [],
      length: 0
    };
    t != null && (r.samples.push(t), r.length = t.length);
    let l = {
      type: "audio",
      id: 2,
      sequenceNumber: 0,
      samples: [],
      length: 0
    };
    n != null && (l.samples.push(n), l.length = n.length), this._videoStashedLastSample = null, this._audioStashedLastSample = null, this._remuxVideo(r, !0), this._remuxAudio(l, !0);
  }
  _remuxAudio(t, n) {
    if (this._audioMeta == null)
      return;
    let r = t, l = r.samples, a, e = -1, g = -1, _ = this._audioMeta.refSampleDuration, y = this._audioMeta.codec === "mp3" && this._mp3UseMpegAudio, x = this._dtsBaseInited && this._audioNextDts === void 0, E = !1;
    if (!l || l.length === 0 || l.length === 1 && !n)
      return;
    let C = 0, L = null, A = 0;
    y ? (C = 0, A = r.length) : (C = 8, A = 8 + r.length);
    let I = null;
    if (l.length > 1 && (I = l.pop(), A -= I.length), this._audioStashedLastSample != null) {
      let P = this._audioStashedLastSample;
      this._audioStashedLastSample = null, l.unshift(P), A += P.length;
    }
    I != null && (this._audioStashedLastSample = I);
    let D = l[0].dts - this._dtsBase;
    if (this._audioNextDts)
      a = D - this._audioNextDts;
    else if (this._audioSegmentInfoList.isEmpty())
      a = 0, this._fillSilentAfterSeek && !this._videoSegmentInfoList.isEmpty() && this._audioMeta.originalCodec !== "mp3" && (E = !0);
    else {
      let P = this._audioSegmentInfoList.getLastSampleBefore(D);
      if (P != null) {
        let $ = D - (P.originalDts + P.duration);
        $ <= 3 && ($ = 0);
        let V = P.dts + P.duration + $;
        a = D - V;
      } else
        a = 0;
    }
    if (E) {
      let P = D - a, $ = this._videoSegmentInfoList.getLastSegmentBefore(D);
      if ($ != null && $.beginDts < P) {
        let V = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);
        if (V) {
          let q = $.beginDts, ee = P - $.beginDts;
          Log.v(this.TAG, `InsertPrefixSilentAudio: dts: ${q}, duration: ${ee}`), l.unshift({ unit: V, dts: q, pts: q }), A += V.byteLength;
        }
      } else
        E = !1;
    }
    let w = [];
    for (let P = 0; P < l.length; P++) {
      let $ = l[P], V = $.unit, q = $.dts - this._dtsBase, ee = q, re = !1, ye = null, ce = 0;
      if (!(q < -1e-3)) {
        if (this._audioMeta.codec !== "mp3") {
          let Q = q;
          const se = 3;
          if (this._audioNextDts && (Q = this._audioNextDts), a = q - Q, a <= -se * _)
            Log.w(this.TAG, `Dropping 1 audio frame (originalDts: ${q} ms ,curRefDts: ${Q} ms)  due to dtsCorrection: ${a} ms overlap.`);
          else if (a >= se * _ && this._fillAudioTimestampGap && !Browser.safari) {
            re = !0;
            let fe = Math.floor(a / _);
            Log.w(this.TAG, `Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
originalDts: ${q} ms, curRefDts: ${Q} ms, dtsCorrection: ${Math.round(a)} ms, generate: ${fe} frames`), ee = Math.floor(Q), ce = Math.floor(Q + _) - ee;
            let G = AAC.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);
            G == null && (Log.w(this.TAG, `Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`), G = V), ye = [];
            for (let K = 0; K < fe; K++) {
              Q = Q + _;
              let de = Math.floor(Q), ve = Math.floor(Q + _) - de, ae = {
                dts: de,
                pts: de,
                cts: 0,
                unit: G,
                size: G.byteLength,
                duration: ve,
                // wait for next sample
                originalDts: q,
                flags: {
                  isLeading: 0,
                  dependsOn: 1,
                  isDependedOn: 0,
                  hasRedundancy: 0
                }
              };
              ye.push(ae), A += ae.size;
            }
            this._audioNextDts = Q + _;
          } else
            ee = Math.floor(Q), ce = Math.floor(Q + _) - ee, this._audioNextDts = Q + _;
        } else
          ee = q - a, P !== l.length - 1 ? ce = l[P + 1].dts - this._dtsBase - a - ee : I != null ? ce = I.dts - this._dtsBase - a - ee : w.length >= 1 ? ce = w[w.length - 1].duration : ce = Math.floor(_), this._audioNextDts = ee + ce;
        e === -1 && (e = ee), w.push({
          dts: ee,
          pts: ee,
          cts: 0,
          unit: $.unit,
          size: $.unit.byteLength,
          duration: ce,
          originalDts: q,
          flags: {
            isLeading: 0,
            dependsOn: 1,
            isDependedOn: 0,
            hasRedundancy: 0
          }
        }), re && w.push.apply(w, ye);
      }
    }
    if (w.length === 0) {
      r.samples = [], r.length = 0;
      return;
    }
    y ? L = new Uint8Array(A) : (L = new Uint8Array(A), L[0] = A >>> 24 & 255, L[1] = A >>> 16 & 255, L[2] = A >>> 8 & 255, L[3] = A & 255, L.set(MP4.types.mdat, 4));
    for (let P = 0; P < w.length; P++) {
      let $ = w[P].unit;
      L.set($, C), C += $.byteLength;
    }
    let S = w[w.length - 1];
    g = S.dts + S.duration;
    let O = new MediaSegmentInfo();
    O.beginDts = e, O.endDts = g, O.beginPts = e, O.endPts = g, O.originalBeginDts = w[0].originalDts, O.originalEndDts = S.originalDts + S.duration, O.firstSample = new SampleInfo(
      w[0].dts,
      w[0].pts,
      w[0].duration,
      w[0].originalDts,
      !1
    ), O.lastSample = new SampleInfo(
      S.dts,
      S.pts,
      S.duration,
      S.originalDts,
      !1
    ), this._isLive || this._audioSegmentInfoList.append(O), r.samples = w, r.sequenceNumber++;
    let F = null;
    y ? F = new Uint8Array() : F = MP4.moof(r, e), r.samples = [], r.length = 0;
    let j = {
      type: "audio",
      data: this._mergeBoxes(F, L).buffer,
      sampleCount: w.length,
      info: O
    };
    y && x && (j.timestampOffset = e), this._onMediaSegment("audio", j);
  }
  _remuxVideo(t, n) {
    if (this._videoMeta == null)
      return;
    let r = t, l = r.samples, a, e = -1, g = -1, _ = -1, y = -1;
    if (!l || l.length === 0 || l.length === 1 && !n)
      return;
    let x = 8, E = null, C = 8 + t.length, L = null;
    if (l.length > 1 && (L = l.pop(), C -= L.length), this._videoStashedLastSample != null) {
      let O = this._videoStashedLastSample;
      this._videoStashedLastSample = null, l.unshift(O), C += O.length;
    }
    L != null && (this._videoStashedLastSample = L);
    let A = l[0].dts - this._dtsBase;
    if (this._videoNextDts)
      a = A - this._videoNextDts;
    else if (this._videoSegmentInfoList.isEmpty())
      a = 0;
    else {
      let O = this._videoSegmentInfoList.getLastSampleBefore(A);
      if (O != null) {
        let F = A - (O.originalDts + O.duration);
        F <= 3 && (F = 0);
        let j = O.dts + O.duration + F;
        a = A - j;
      } else
        a = 0;
    }
    let I = new MediaSegmentInfo(), D = [];
    for (let O = 0; O < l.length; O++) {
      let F = l[O], j = F.dts - this._dtsBase, P = F.isKeyframe, $ = j - a, V = F.cts, q = $ + V;
      e === -1 && (e = $, _ = q);
      let ee = 0;
      if (O !== l.length - 1 ? ee = l[O + 1].dts - this._dtsBase - a - $ : L != null ? ee = L.dts - this._dtsBase - a - $ : D.length >= 1 ? ee = D[D.length - 1].duration : ee = Math.floor(this._videoMeta.refSampleDuration), P) {
        let re = new SampleInfo($, q, ee, F.dts, !0);
        re.fileposition = F.fileposition, I.appendSyncPoint(re);
      }
      D.push({
        dts: $,
        pts: q,
        cts: V,
        units: F.units,
        size: F.length,
        isKeyframe: P,
        duration: ee,
        originalDts: j,
        flags: {
          isLeading: 0,
          dependsOn: P ? 2 : 1,
          isDependedOn: P ? 1 : 0,
          hasRedundancy: 0,
          isNonSync: P ? 0 : 1
        }
      });
    }
    E = new Uint8Array(C), E[0] = C >>> 24 & 255, E[1] = C >>> 16 & 255, E[2] = C >>> 8 & 255, E[3] = C & 255, E.set(MP4.types.mdat, 4);
    for (let O = 0; O < D.length; O++) {
      let F = D[O].units;
      for (; F.length; ) {
        let P = F.shift().data;
        E.set(P, x), x += P.byteLength;
      }
    }
    let w = D[D.length - 1];
    if (g = w.dts + w.duration, y = w.pts + w.duration, this._videoNextDts = g, I.beginDts = e, I.endDts = g, I.beginPts = _, I.endPts = y, I.originalBeginDts = D[0].originalDts, I.originalEndDts = w.originalDts + w.duration, I.firstSample = new SampleInfo(
      D[0].dts,
      D[0].pts,
      D[0].duration,
      D[0].originalDts,
      D[0].isKeyframe
    ), I.lastSample = new SampleInfo(
      w.dts,
      w.pts,
      w.duration,
      w.originalDts,
      w.isKeyframe
    ), this._isLive || this._videoSegmentInfoList.append(I), r.samples = D, r.sequenceNumber++, this._forceFirstIDR) {
      let O = D[0].flags;
      O.dependsOn = 2, O.isNonSync = 0;
    }
    let S = MP4.moof(r, e);
    r.samples = [], r.length = 0, this._onMediaSegment("video", {
      type: "video",
      data: this._mergeBoxes(S, E).buffer,
      sampleCount: D.length,
      info: I
    });
  }
  _mergeBoxes(t, n) {
    let r = new Uint8Array(t.byteLength + n.byteLength);
    return r.set(t, 0), r.set(n, t.byteLength), r;
  }
}
const TransmuxingEvents = {
  IO_ERROR: "io_error",
  DEMUX_ERROR: "demux_error",
  INIT_SEGMENT: "init_segment",
  MEDIA_SEGMENT: "media_segment",
  LOADING_COMPLETE: "loading_complete",
  RECOVERED_EARLY_EOF: "recovered_early_eof",
  MEDIA_INFO: "media_info",
  METADATA_ARRIVED: "metadata_arrived",
  SCRIPTDATA_ARRIVED: "scriptdata_arrived",
  STATISTICS_INFO: "statistics_info",
  RECOMMEND_SEEKPOINT: "recommend_seekpoint"
};
class TransmuxingController {
  constructor(t, n) {
    this.TAG = "TransmuxingController", this._emitter = new EventEmitter$1(), this._config = n, t.segments || (t.segments = [{
      duration: t.duration,
      filesize: t.filesize,
      url: t.url
    }]), typeof t.cors != "boolean" && (t.cors = !0), typeof t.withCredentials != "boolean" && (t.withCredentials = !1), this._mediaDataSource = t, this._currentSegmentIndex = 0;
    let r = 0;
    this._mediaDataSource.segments.forEach((l) => {
      l.timestampBase = r, r += l.duration, l.cors = t.cors, l.withCredentials = t.withCredentials, n.referrerPolicy && (l.referrerPolicy = n.referrerPolicy);
    }), !isNaN(r) && this._mediaDataSource.duration !== r && (this._mediaDataSource.duration = r), this._mediaInfo = null, this._demuxer = null, this._remuxer = null, this._ioctl = null, this._pendingSeekTime = null, this._pendingResolveSeekPoint = null, this._statisticsReporter = null;
  }
  destroy() {
    var t, n;
    this._mediaInfo = null, this._mediaDataSource = null, this._statisticsReporter && this._disableStatisticsReporter(), this._ioctl && (this._ioctl.destroy(), this._ioctl = null), this._demuxer && ((t = this._demuxer) != null && t.destroy && this._demuxer.destroy(), this._demuxer = null), this._remuxer && ((n = this._remuxer) != null && n.destroy && this._remuxer.destroy(), this._remuxer = null), this._emitter.removeAllListeners(), this._emitter = null;
  }
  on(t, n) {
    this._emitter.addListener(t, n);
  }
  off(t, n) {
    this._emitter.removeListener(t, n);
  }
  start() {
    this._loadSegment(0), this._enableStatisticsReporter();
  }
  _loadSegment(t, n) {
    this._currentSegmentIndex = t;
    let r = this._mediaDataSource.segments[t], l = this._ioctl = new IOController(r, this._config, t);
    l.onError = this._onIOException.bind(this), l.onSeeked = this._onIOSeeked.bind(this), l.onComplete = this._onIOComplete.bind(this), l.onRedirect = this._onIORedirect.bind(this), l.onRecoveredEarlyEof = this._onIORecoveredEarlyEof.bind(this), n ? this._demuxer.bindDataSource(this._ioctl) : l.onDataArrival = this._onInitChunkArrival.bind(this), l.open(n);
  }
  stop() {
    this._internalAbort(), this._disableStatisticsReporter();
  }
  _internalAbort() {
    this._ioctl && (this._ioctl.destroy(), this._ioctl = null);
  }
  pause() {
    this._ioctl && this._ioctl.isWorking() && (this._ioctl.pause(), this._disableStatisticsReporter());
  }
  resume() {
    this._ioctl && this._ioctl.isPaused() && (this._ioctl.resume(), this._enableStatisticsReporter());
  }
  seek(t) {
    if (this._mediaInfo == null || !this._mediaInfo.isSeekable())
      return;
    let n = this._searchSegmentIndexContains(t);
    if (n === this._currentSegmentIndex) {
      let r = this._mediaInfo.segments[n];
      if (r == null)
        this._pendingSeekTime = t;
      else {
        let l = r.getNearestKeyframe(t);
        this._remuxer.seek(l.milliseconds), this._ioctl.seek(l.fileposition), this._pendingResolveSeekPoint = l.milliseconds;
      }
    } else {
      let r = this._mediaInfo.segments[n];
      if (r == null)
        this._pendingSeekTime = t, this._internalAbort(), this._remuxer.seek(), this._remuxer.insertDiscontinuity(), this._loadSegment(n);
      else {
        let l = r.getNearestKeyframe(t);
        this._internalAbort(), this._remuxer.seek(t), this._remuxer.insertDiscontinuity(), this._demuxer.resetMediaInfo(), this._demuxer.timestampBase = this._mediaDataSource.segments[n].timestampBase, this._loadSegment(n, l.fileposition), this._pendingResolveSeekPoint = l.milliseconds, this._reportSegmentMediaInfo(n);
      }
    }
    this._enableStatisticsReporter();
  }
  _searchSegmentIndexContains(t) {
    let n = this._mediaDataSource.segments, r = n.length - 1;
    for (let l = 0; l < n.length; l++)
      if (t < n[l].timestampBase) {
        r = l - 1;
        break;
      }
    return r;
  }
  _onInitChunkArrival(t, n, r = "") {
    let l = null, a = 0;
    if (n > 0)
      this._demuxer.bindDataSource(this._ioctl), this._demuxer.timestampBase = this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase, a = this._demuxer.parseChunks(t, n);
    else if ((l = FLVDemuxer.probe(t)).match) {
      console.error(l, "probeData", this._config, "FLVDemuxer"), this._demuxer = new FLVDemuxer(l, this._config), this._remuxer || (this._remuxer = new MP4Remuxer(this._config));
      let e = this._mediaDataSource;
      e.duration != null && !isNaN(e.duration) && (this._demuxer.overridedDuration = e.duration), typeof e.hasAudio == "boolean" && (this._demuxer.overridedHasAudio = e.hasAudio), typeof e.hasVideo == "boolean" && (this._demuxer.overridedHasVideo = e.hasVideo), this._demuxer.timestampBase = e.segments[this._currentSegmentIndex].timestampBase, this._demuxer.onError = this._onDemuxException.bind(this), this._demuxer.onMediaInfo = this._onMediaInfo.bind(this), this._demuxer.onMetaDataArrived = this._onMetaDataArrived.bind(this), this._demuxer.onScriptDataArrived = this._onScriptDataArrived.bind(this), this._remuxer.bindDataSource(this._demuxer.bindDataSource(
        this._ioctl
      )), this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this), this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this), a = this._demuxer.parseChunks(t, n, r);
    } else
      l = null, Log.e(this.TAG, "Non-FLV, Unsupported media type!"), Promise.resolve().then(() => {
        this._internalAbort();
      }), this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, DemuxErrors.FORMAT_UNSUPPORTED, "Non-FLV, Unsupported media type"), a = 0;
    return a;
  }
  _onMediaInfo(t) {
    console.error(t, "mediaInfo"), this._mediaInfo == null && (this._mediaInfo = Object.assign({}, t), this._mediaInfo.keyframesIndex = null, this._mediaInfo.segments = [], this._mediaInfo.segmentCount = this._mediaDataSource.segments.length, Object.setPrototypeOf(this._mediaInfo, MediaInfo.prototype));
    let n = Object.assign({}, t);
    Object.setPrototypeOf(n, MediaInfo.prototype), this._mediaInfo.segments[this._currentSegmentIndex] = n, this._reportSegmentMediaInfo(this._currentSegmentIndex), this._pendingSeekTime != null && Promise.resolve().then(() => {
      let r = this._pendingSeekTime;
      this._pendingSeekTime = null, this.seek(r);
    });
  }
  _onMetaDataArrived(t) {
    console.error(t, "metadata"), this._emitter.emit(TransmuxingEvents.METADATA_ARRIVED, t);
  }
  _onScriptDataArrived(t) {
    console.error(t, "data"), this._emitter.emit(TransmuxingEvents.SCRIPTDATA_ARRIVED, t);
  }
  _onIOSeeked() {
    this._remuxer.insertDiscontinuity();
  }
  _onIOComplete(t) {
    let r = t + 1;
    r < this._mediaDataSource.segments.length ? (this._internalAbort(), this._remuxer && this._remuxer.flushStashedSamples(), this._loadSegment(r)) : (this._remuxer && this._remuxer.flushStashedSamples(), this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE), this._disableStatisticsReporter());
  }
  _onIORedirect(t) {
    let n = this._ioctl.extraData;
    this._mediaDataSource.segments[n].redirectedURL = t;
  }
  _onIORecoveredEarlyEof() {
    this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF);
  }
  _onIOException(t, n) {
    Log.e(this.TAG, `IOException: type = ${t}, code = ${n.code}, msg = ${n.msg}`), this._emitter.emit(TransmuxingEvents.IO_ERROR, t, n), this._disableStatisticsReporter();
  }
  _onDemuxException(t, n) {
    Log.e(this.TAG, `DemuxException: type = ${t}, info = ${n}`), this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, t, n);
  }
  _onRemuxerInitSegmentArrival(t, n) {
    this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, t, n);
  }
  _onRemuxerMediaSegmentArrival(t, n) {
    if (this._pendingSeekTime == null && (this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, t, n), this._pendingResolveSeekPoint != null && t === "video")) {
      let r = n.info.syncPoints, l = this._pendingResolveSeekPoint;
      this._pendingResolveSeekPoint = null, Browser.safari && r.length > 0 && r[0].originalDts === l && (l = r[0].pts), this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, l);
    }
  }
  _enableStatisticsReporter() {
    this._statisticsReporter == null && (this._statisticsReporter = self.setInterval(
      this._reportStatisticsInfo.bind(this),
      this._config.statisticsInfoReportInterval
    ));
  }
  _disableStatisticsReporter() {
    this._statisticsReporter && (self.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
  }
  _reportSegmentMediaInfo(t) {
    let n = this._mediaInfo.segments[t], r = Object.assign({}, n);
    r.duration = this._mediaInfo.duration, r.segmentCount = this._mediaInfo.segmentCount, delete r.segments, delete r.keyframesIndex, this._emitter.emit(TransmuxingEvents.MEDIA_INFO, r);
  }
  _reportStatisticsInfo() {
  }
}
class Transmuxer {
  constructor(t, n) {
    if (this.TAG = "Transmuxer", this._emitter = new EventEmitter$1(), this._controller = new TransmuxingController(t, n), this._controller) {
      let r = this._controller;
      r.on(TransmuxingEvents.IO_ERROR, this._onIOError.bind(this)), r.on(TransmuxingEvents.DEMUX_ERROR, this._onDemuxError.bind(this)), r.on(TransmuxingEvents.INIT_SEGMENT, this._onInitSegment.bind(this)), r.on(TransmuxingEvents.MEDIA_SEGMENT, this._onMediaSegment.bind(this)), r.on(TransmuxingEvents.LOADING_COMPLETE, this._onLoadingComplete.bind(this)), r.on(TransmuxingEvents.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this)), r.on(TransmuxingEvents.MEDIA_INFO, this._onMediaInfo.bind(this)), r.on(TransmuxingEvents.METADATA_ARRIVED, this._onMetaDataArrived.bind(this)), r.on(TransmuxingEvents.SCRIPTDATA_ARRIVED, this._onScriptDataArrived.bind(this)), r.on(TransmuxingEvents.STATISTICS_INFO, this._onStatisticsInfo.bind(this)), r.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));
    }
  }
  destroy() {
    var t;
    this._worker ? this._workerDestroying || (this._workerDestroying = !0, this._worker.postMessage({ cmd: "destroy" }), LoggingControl.removeListener(this.e.onLoggingConfigChanged), this.e = null) : ((t = this._controller) == null || t.destroy(), this._controller = null), this._emitter.removeAllListeners(), this._emitter = null;
  }
  on(t, n) {
    this._emitter.addListener(t, n);
  }
  off(t, n) {
    this._emitter.removeListener(t, n);
  }
  hasWorker() {
    return this._worker != null;
  }
  open() {
    this._worker ? this._worker.postMessage({ cmd: "start" }) : this._controller.start();
  }
  close() {
    this._worker ? this._worker.postMessage({ cmd: "stop" }) : this._controller.stop();
  }
  seek(t) {
    this._worker ? this._worker.postMessage({ cmd: "seek", param: t }) : this._controller.seek(t);
  }
  pause() {
    this._worker ? this._worker.postMessage({ cmd: "pause" }) : this._controller.pause();
  }
  resume() {
    this._worker ? this._worker.postMessage({ cmd: "resume" }) : this._controller.resume();
  }
  _onInitSegment(t, n) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.INIT_SEGMENT, t, n);
    });
  }
  _onMediaSegment(t, n) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.MEDIA_SEGMENT, t, n);
    });
  }
  _onLoadingComplete() {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.LOADING_COMPLETE);
    });
  }
  _onRecoveredEarlyEof() {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.RECOVERED_EARLY_EOF);
    });
  }
  _onMediaInfo(t) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.MEDIA_INFO, t);
    });
  }
  _onMetaDataArrived(t) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.METADATA_ARRIVED, t);
    });
  }
  _onScriptDataArrived(t) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.SCRIPTDATA_ARRIVED, t);
    });
  }
  _onStatisticsInfo(t) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.STATISTICS_INFO, t);
    });
  }
  _onIOError(t, n) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.IO_ERROR, t, n);
    });
  }
  _onDemuxError(t, n) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.DEMUX_ERROR, t, n);
    });
  }
  _onRecommendSeekpoint(t) {
    Promise.resolve().then(() => {
      this._emitter.emit(TransmuxingEvents.RECOMMEND_SEEKPOINT, t);
    });
  }
  _onLoggingConfigChanged(t) {
    this._worker && this._worker.postMessage({ cmd: "logging_config", param: t });
  }
  _onWorkerMessage(t) {
    let n = t.data, r = n.data;
    if (n.msg === "destroyed" || this._workerDestroying) {
      this._workerDestroying = !1, this._worker.terminate(), this._worker = null;
      return;
    }
    switch (n.msg) {
      case TransmuxingEvents.INIT_SEGMENT:
      case TransmuxingEvents.MEDIA_SEGMENT:
        this._emitter.emit(n.msg, r.type, r.data);
        break;
      case TransmuxingEvents.LOADING_COMPLETE:
      case TransmuxingEvents.RECOVERED_EARLY_EOF:
        this._emitter.emit(n.msg);
        break;
      case TransmuxingEvents.MEDIA_INFO:
        Object.setPrototypeOf(r, MediaInfo.prototype), this._emitter.emit(n.msg, r);
        break;
      case TransmuxingEvents.METADATA_ARRIVED:
      case TransmuxingEvents.SCRIPTDATA_ARRIVED:
      case TransmuxingEvents.STATISTICS_INFO:
        this._emitter.emit(n.msg, r);
        break;
      case TransmuxingEvents.IO_ERROR:
      case TransmuxingEvents.DEMUX_ERROR:
        this._emitter.emit(n.msg, r.type, r.info);
        break;
      case TransmuxingEvents.RECOMMEND_SEEKPOINT:
        this._emitter.emit(n.msg, r);
        break;
      case "logcat_callback":
        Log.emitter.emit("log", r.type, r.logcat);
        break;
    }
  }
}
const MSEEvents = {
  ERROR: "error",
  SOURCE_OPEN: "source_open",
  UPDATE_END: "update_end",
  BUFFER_FULL: "buffer_full"
};
class MSEController {
  constructor(t) {
    this.TAG = "MSEController", this._config = t, this._emitter = new EventEmitter$1(), this._config.isLive && this._config.autoCleanupSourceBuffer == null && (this._config.autoCleanupSourceBuffer = !0), this.e = {
      onSourceOpen: this._onSourceOpen.bind(this),
      onSourceEnded: this._onSourceEnded.bind(this),
      onSourceClose: this._onSourceClose.bind(this),
      onSourceBufferError: this._onSourceBufferError.bind(this),
      onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this)
    }, this._mediaSource = null, this._mediaSourceObjectURL = null, this._mediaElement = null, this._isBufferFull = !1, this._hasPendingEos = !1, this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0, this._pendingSourceBufferInit = [], this._mimeTypes = {
      video: null,
      audio: null
    }, this._sourceBuffers = {
      video: null,
      audio: null
    }, this._lastInitSegments = {
      video: null,
      audio: null
    }, this._pendingSegments = {
      video: [],
      audio: []
    }, this._pendingRemoveRanges = {
      video: [],
      audio: []
    }, this._idrList = new IDRSampleList();
  }
  destroy() {
    (this._mediaElement || this._mediaSource) && this.detachMediaElement(), this.e = null, this._emitter.removeAllListeners(), this._emitter = null;
  }
  on(t, n) {
    this._emitter.addListener(t, n);
  }
  off(t, n) {
    this._emitter.removeListener(t, n);
  }
  attachMediaElement(t) {
    if (this._mediaSource)
      throw new IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");
    let n = this._mediaSource = new window.MediaSource();
    n.addEventListener("sourceopen", this.e.onSourceOpen), n.addEventListener("sourceended", this.e.onSourceEnded), n.addEventListener("sourceclose", this.e.onSourceClose), this._mediaElement = t, this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource), t.src = this._mediaSourceObjectURL;
  }
  detachMediaElement() {
    if (this._mediaSource) {
      let t = this._mediaSource;
      for (let n in this._sourceBuffers) {
        let r = this._pendingSegments[n];
        r.splice(0, r.length), this._pendingSegments[n] = null, this._pendingRemoveRanges[n] = null, this._lastInitSegments[n] = null;
        let l = this._sourceBuffers[n];
        if (l) {
          if (t.readyState !== "closed") {
            try {
              t.removeSourceBuffer(l);
            } catch (a) {
              Log.e(this.TAG, a.message);
            }
            l.removeEventListener("error", this.e.onSourceBufferError), l.removeEventListener("updateend", this.e.onSourceBufferUpdateEnd);
          }
          this._mimeTypes[n] = null, this._sourceBuffers[n] = null;
        }
      }
      if (t.readyState === "open")
        try {
          t.endOfStream();
        } catch (n) {
          Log.e(this.TAG, n.message);
        }
      t.removeEventListener("sourceopen", this.e.onSourceOpen), t.removeEventListener("sourceended", this.e.onSourceEnded), t.removeEventListener("sourceclose", this.e.onSourceClose), this._pendingSourceBufferInit = [], this._isBufferFull = !1, this._idrList.clear(), this._mediaSource = null;
    }
    this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src"), this._mediaElement = null), this._mediaSourceObjectURL && (window.URL.revokeObjectURL(this._mediaSourceObjectURL), this._mediaSourceObjectURL = null);
  }
  appendInitSegment(t, n) {
    if (!this._mediaSource || this._mediaSource.readyState !== "open") {
      this._pendingSourceBufferInit.push(t), this._pendingSegments[t.type].push(t);
      return;
    }
    let r = t, l = `${r.container}`;
    r.codec && r.codec.length > 0 && (l += `;codecs=${r.codec}`);
    let a = !1;
    if (Log.v(this.TAG, "Received Initialization Segment, mimeType: " + l), this._lastInitSegments[r.type] = r, l !== this._mimeTypes[r.type]) {
      if (this._mimeTypes[r.type])
        Log.v(this.TAG, `Notice: ${r.type} mimeType changed, origin: ${this._mimeTypes[r.type]}, target: ${l}`);
      else {
        a = !0;
        try {
          let e = this._sourceBuffers[r.type] = this._mediaSource.addSourceBuffer(l);
          e.addEventListener("error", this.e.onSourceBufferError), e.addEventListener("updateend", this.e.onSourceBufferUpdateEnd);
        } catch (e) {
          Log.e(this.TAG, e.message), this._emitter.emit(MSEEvents.ERROR, { code: e.code, msg: e.message });
          return;
        }
      }
      this._mimeTypes[r.type] = l;
    }
    n || this._pendingSegments[r.type].push(r), a || this._sourceBuffers[r.type] && !this._sourceBuffers[r.type].updating && this._doAppendSegments(), Browser.safari && r.container === "audio/mpeg" && r.mediaDuration > 0 && (this._requireSetMediaDuration = !0, this._pendingMediaDuration = r.mediaDuration / 1e3, this._updateMediaSourceDuration());
  }
  appendMediaSegment(t) {
    let n = t;
    this._pendingSegments[n.type].push(n), this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer() && this._doCleanupSourceBuffer();
    let r = this._sourceBuffers[n.type];
    r && !r.updating && !this._hasPendingRemoveRanges() && this._doAppendSegments();
  }
  seek(t) {
    for (let n in this._sourceBuffers) {
      if (!this._sourceBuffers[n])
        continue;
      let r = this._sourceBuffers[n];
      if (this._mediaSource.readyState === "open")
        try {
          r.abort();
        } catch (a) {
          Log.e(this.TAG, a.message);
        }
      this._idrList.clear();
      let l = this._pendingSegments[n];
      if (l.splice(0, l.length), this._mediaSource.readyState !== "closed") {
        for (let a = 0; a < r.buffered.length; a++) {
          let e = r.buffered.start(a), g = r.buffered.end(a);
          this._pendingRemoveRanges[n].push({ start: e, end: g });
        }
        if (r.updating || this._doRemoveRanges(), Browser.safari) {
          let a = this._lastInitSegments[n];
          a && (this._pendingSegments[n].push(a), r.updating || this._doAppendSegments());
        }
      }
    }
  }
  endOfStream() {
    let t = this._mediaSource, n = this._sourceBuffers;
    if (!t || t.readyState !== "open") {
      t && t.readyState === "closed" && this._hasPendingSegments() && (this._hasPendingEos = !0);
      return;
    }
    n.video && n.video.updating || n.audio && n.audio.updating ? this._hasPendingEos = !0 : (this._hasPendingEos = !1, t.endOfStream());
  }
  getNearestKeyframe(t) {
    return this._idrList.getLastSyncPointBeforeDts(t);
  }
  _needCleanupSourceBuffer() {
    if (!this._config.autoCleanupSourceBuffer)
      return !1;
    let t = this._mediaElement.currentTime;
    for (let n in this._sourceBuffers) {
      let r = this._sourceBuffers[n];
      if (r) {
        let l = r.buffered;
        if (l.length >= 1 && t - l.start(0) >= this._config.autoCleanupMaxBackwardDuration)
          return !0;
      }
    }
    return !1;
  }
  _doCleanupSourceBuffer() {
    let t = this._mediaElement.currentTime;
    for (let n in this._sourceBuffers) {
      let r = this._sourceBuffers[n];
      if (r) {
        let l = r.buffered, a = !1;
        for (let e = 0; e < l.length; e++) {
          let g = l.start(e), _ = l.end(e);
          if (g <= t && t < _ + 3) {
            if (t - g >= this._config.autoCleanupMaxBackwardDuration) {
              a = !0;
              let y = t - this._config.autoCleanupMinBackwardDuration;
              this._pendingRemoveRanges[n].push({ start: g, end: y });
            }
          } else
            _ < t && (a = !0, this._pendingRemoveRanges[n].push({ start: g, end: _ }));
        }
        a && !r.updating && this._doRemoveRanges();
      }
    }
  }
  _updateMediaSourceDuration() {
    let t = this._sourceBuffers;
    if (this._mediaElement.readyState === 0 || this._mediaSource.readyState !== "open" || t.video && t.video.updating || t.audio && t.audio.updating)
      return;
    let n = this._mediaSource.duration, r = this._pendingMediaDuration;
    r > 0 && (isNaN(n) || r > n) && (Log.v(this.TAG, `Update MediaSource duration from ${n} to ${r}`), this._mediaSource.duration = r), this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0;
  }
  _doRemoveRanges() {
    for (let t in this._pendingRemoveRanges) {
      if (!this._sourceBuffers[t] || this._sourceBuffers[t].updating)
        continue;
      let n = this._sourceBuffers[t], r = this._pendingRemoveRanges[t];
      for (; r.length && !n.updating; ) {
        let l = r.shift();
        n.remove(l.start, l.end);
      }
    }
  }
  _doAppendSegments() {
    let t = this._pendingSegments;
    for (let n in t)
      if (!(!this._sourceBuffers[n] || this._sourceBuffers[n].updating) && t[n].length > 0) {
        let r = t[n].shift();
        if (r.timestampOffset) {
          let l = this._sourceBuffers[n].timestampOffset, a = r.timestampOffset / 1e3;
          Math.abs(l - a) > 0.1 && (Log.v(this.TAG, `Update MPEG audio timestampOffset from ${l} to ${a}`), this._sourceBuffers[n].timestampOffset = a), delete r.timestampOffset;
        }
        if (!r.data || r.data.byteLength === 0)
          continue;
        try {
          this._sourceBuffers[n].appendBuffer(r.data), this._isBufferFull = !1, n === "video" && r.hasOwnProperty("info") && this._idrList.appendArray(r.info.syncPoints);
        } catch (l) {
          this._pendingSegments[n].unshift(r), l.code === 22 ? (this._isBufferFull || this._emitter.emit(MSEEvents.BUFFER_FULL), this._isBufferFull = !0) : (Log.e(this.TAG, l.message), this._emitter.emit(MSEEvents.ERROR, { code: l.code, msg: l.message }));
        }
      }
  }
  _onSourceOpen() {
    if (Log.v(this.TAG, "MediaSource onSourceOpen"), this._mediaSource.removeEventListener("sourceopen", this.e.onSourceOpen), this._pendingSourceBufferInit.length > 0) {
      let t = this._pendingSourceBufferInit;
      for (; t.length; ) {
        let n = t.shift();
        this.appendInitSegment(n, !0);
      }
    }
    this._hasPendingSegments() && this._doAppendSegments(), this._emitter.emit(MSEEvents.SOURCE_OPEN);
  }
  _onSourceEnded() {
    Log.v(this.TAG, "MediaSource onSourceEnded");
  }
  _onSourceClose() {
    Log.v(this.TAG, "MediaSource onSourceClose"), this._mediaSource && this.e != null && (this._mediaSource.removeEventListener("sourceopen", this.e.onSourceOpen), this._mediaSource.removeEventListener("sourceended", this.e.onSourceEnded), this._mediaSource.removeEventListener("sourceclose", this.e.onSourceClose));
  }
  _hasPendingSegments() {
    let t = this._pendingSegments;
    return t.video.length > 0 || t.audio.length > 0;
  }
  _hasPendingRemoveRanges() {
    let t = this._pendingRemoveRanges;
    return t.video.length > 0 || t.audio.length > 0;
  }
  _onSourceBufferUpdateEnd() {
    this._requireSetMediaDuration ? this._updateMediaSourceDuration() : this._hasPendingRemoveRanges() ? this._doRemoveRanges() : this._hasPendingSegments() ? this._doAppendSegments() : this._hasPendingEos && this.endOfStream(), this._emitter.emit(MSEEvents.UPDATE_END);
  }
  _onSourceBufferError(t) {
    Log.e(this.TAG, `SourceBuffer Error: ${t}`);
  }
}
const ErrorTypes = {
  NETWORK_ERROR: "NetworkError",
  MEDIA_ERROR: "MediaError",
  OTHER_ERROR: "OtherError"
}, ErrorDetails = {
  NETWORK_EXCEPTION: LoaderErrors.EXCEPTION,
  NETWORK_STATUS_CODE_INVALID: LoaderErrors.HTTP_STATUS_CODE_INVALID,
  NETWORK_TIMEOUT: LoaderErrors.CONNECTING_TIMEOUT,
  NETWORK_UNRECOVERABLE_EARLY_EOF: LoaderErrors.UNRECOVERABLE_EARLY_EOF,
  MEDIA_MSE_ERROR: "MediaMSEError",
  MEDIA_FORMAT_ERROR: DemuxErrors.FORMAT_ERROR,
  MEDIA_FORMAT_UNSUPPORTED: DemuxErrors.FORMAT_UNSUPPORTED,
  MEDIA_CODEC_UNSUPPORTED: DemuxErrors.CODEC_UNSUPPORTED
};
class FlvPlayer {
  constructor(t, n) {
    if (this.TAG = "FlvPlayer", this._type = "FlvPlayer", this._emitter = new EventEmitter$1(), this._config = createDefaultConfig(), typeof n == "object" && Object.assign(this._config, n), t.type.toLowerCase() !== "flv")
      throw new InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");
    t.isLive === !0 && (this._config.isLive = !0), this.e = {
      onvLoadedMetadata: this._onvLoadedMetadata.bind(this),
      onvSeeking: this._onvSeeking.bind(this),
      onvCanPlay: this._onvCanPlay.bind(this),
      onvStalled: this._onvStalled.bind(this),
      onvProgress: this._onvProgress.bind(this)
    }, self.performance && self.performance.now ? this._now = self.performance.now.bind(self.performance) : this._now = Date.now, this._pendingSeekTime = null, this._requestSetTime = !1, this._seekpointRecord = null, this._progressChecker = null, this._mediaDataSource = t, this._mediaElement = null, this._msectl = null, this._transmuxer = null, this._mseSourceOpened = !1, this._hasPendingLoad = !1, this._receivedCanPlay = !1, this._mediaInfo = null, this._statisticsInfo = null;
    let r = Browser.chrome && (Browser.version.major < 50 || Browser.version.major === 50 && Browser.version.build < 2661);
    this._alwaysSeekKeyframe = !!(r || Browser.msedge || Browser.msie), this._alwaysSeekKeyframe && (this._config.accurateSeek = !1);
  }
  destroy() {
    this._progressChecker != null && (window.clearInterval(this._progressChecker), this._progressChecker = null), this._transmuxer && this.unload(), this._mediaElement && this.detachMediaElement(), this.e = null, this._mediaDataSource = null, this._emitter.removeAllListeners(), this._emitter = null;
  }
  on(t, n) {
    t === PlayerEvents.MEDIA_INFO ? this._mediaInfo != null && Promise.resolve().then(() => {
      this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);
    }) : t === PlayerEvents.STATISTICS_INFO && this._statisticsInfo != null && Promise.resolve().then(() => {
      this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);
    }), this._emitter.addListener(t, n);
  }
  off(t, n) {
    this._emitter.removeListener(t, n);
  }
  attachMediaElement(t) {
    if (this._mediaElement = t, t.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), t.addEventListener("seeking", this.e.onvSeeking), t.addEventListener("canplay", this.e.onvCanPlay), t.addEventListener("stalled", this.e.onvStalled), t.addEventListener("progress", this.e.onvProgress), this._msectl = new MSEController(this._config), this._msectl.on(MSEEvents.UPDATE_END, this._onmseUpdateEnd.bind(this)), this._msectl.on(MSEEvents.BUFFER_FULL, this._onmseBufferFull.bind(this)), this._msectl.on(MSEEvents.SOURCE_OPEN, () => {
      this._mseSourceOpened = !0, this._hasPendingLoad && (this._hasPendingLoad = !1, this.load());
    }), this._msectl.on(MSEEvents.ERROR, (n) => {
      this._emitter.emit(
        PlayerEvents.ERROR,
        ErrorTypes.MEDIA_ERROR,
        ErrorDetails.MEDIA_MSE_ERROR,
        n
      );
    }), this._msectl.attachMediaElement(t), this._pendingSeekTime != null)
      try {
        t.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
      } catch {
      }
  }
  detachMediaElement() {
    this._mediaElement && (this._msectl.detachMediaElement(), this._mediaElement.removeEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._mediaElement.removeEventListener("seeking", this.e.onvSeeking), this._mediaElement.removeEventListener("canplay", this.e.onvCanPlay), this._mediaElement.removeEventListener("stalled", this.e.onvStalled), this._mediaElement.removeEventListener("progress", this.e.onvProgress), this._mediaElement = null), this._msectl && (this._msectl.destroy(), this._msectl = null);
  }
  load() {
    if (!this._mediaElement)
      throw new IllegalStateException("HTMLMediaElement must be attached before load()!");
    if (this._transmuxer)
      throw new IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");
    if (this._hasPendingLoad)
      return;
    if (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === !1) {
      this._hasPendingLoad = !0;
      return;
    }
    this._mediaElement.readyState > 0 && (this._requestSetTime = !0, this._mediaElement.currentTime = 0), this._transmuxer = new Transmuxer(this._mediaDataSource, this._config), this._transmuxer.on(TransmuxingEvents.INIT_SEGMENT, (l, a) => {
      this._msectl.appendInitSegment(a);
    }), this._transmuxer.on(TransmuxingEvents.MEDIA_SEGMENT, (l, a) => {
      if (this._msectl.appendMediaSegment(a), this._config.lazyLoad && !this._config.isLive) {
        let e = this._mediaElement.currentTime;
        a.info.endDts >= (e + this._config.lazyLoadMaxDuration) * 1e3 && this._progressChecker == null && (Log.v(this.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), this._suspendTransmuxer());
      }
    }), this._transmuxer.on(TransmuxingEvents.LOADING_COMPLETE, () => {
      this._msectl.endOfStream(), this._emitter.emit(PlayerEvents.LOADING_COMPLETE);
    }), this._transmuxer.on(TransmuxingEvents.RECOVERED_EARLY_EOF, () => {
      this._emitter.emit(PlayerEvents.RECOVERED_EARLY_EOF);
    }), this._transmuxer.on(TransmuxingEvents.IO_ERROR, (l, a) => {
      this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.NETWORK_ERROR, l, a);
    }), this._transmuxer.on(TransmuxingEvents.DEMUX_ERROR, (l, a) => {
      this._emitter.emit(PlayerEvents.ERROR, ErrorTypes.MEDIA_ERROR, l, { code: -1, msg: a });
    }), this._transmuxer.on(TransmuxingEvents.MEDIA_INFO, (l) => {
      this._mediaInfo = l, this._emitter.emit(PlayerEvents.MEDIA_INFO, Object.assign({}, l));
    }), this._transmuxer.on(TransmuxingEvents.METADATA_ARRIVED, (l) => {
      this._emitter.emit(PlayerEvents.METADATA_ARRIVED, l);
    }), this._transmuxer.on(TransmuxingEvents.SCRIPTDATA_ARRIVED, (l) => {
      this._emitter.emit(PlayerEvents.SCRIPTDATA_ARRIVED, l);
    }), this._transmuxer.on(TransmuxingEvents.STATISTICS_INFO, (l) => {
      this._statisticsInfo = this._fillStatisticsInfo(l), this._emitter.emit(PlayerEvents.STATISTICS_INFO, Object.assign({}, this._statisticsInfo));
    }), this._transmuxer.on(TransmuxingEvents.RECOMMEND_SEEKPOINT, (l) => {
      this._mediaElement && !this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement.currentTime = l / 1e3);
    }), this._transmuxer.open();
    let t = this._transmuxer._controller, n = t._ioctl._loader;
    var r = n._onComplete;
    n._onComplete = function() {
      t._remuxer || (t._remuxer = {
        flushStashedSamples: function() {
          console.log("flushStashedSamples");
        }
      }), r();
    };
  }
  unload() {
    this._mediaElement && this._mediaElement.pause(), this._msectl && this._msectl.seek(0), this._transmuxer && (this._transmuxer.close(), this._transmuxer.destroy(), this._transmuxer = null);
  }
  play() {
    return this._mediaElement.play();
  }
  pause() {
    this._mediaElement.pause();
  }
  get type() {
    return this._type;
  }
  get buffered() {
    return this._mediaElement.buffered;
  }
  get duration() {
    return this._mediaElement.duration;
  }
  get volume() {
    return this._mediaElement.volume;
  }
  set volume(t) {
    this._mediaElement.volume = t;
  }
  get muted() {
    return this._mediaElement.muted;
  }
  set muted(t) {
    this._mediaElement.muted = t;
  }
  get currentTime() {
    return this._mediaElement ? this._mediaElement.currentTime : 0;
  }
  set currentTime(t) {
    this._mediaElement ? this._internalSeek(t) : this._pendingSeekTime = t;
  }
  get mediaInfo() {
    return Object.assign({}, this._mediaInfo);
  }
  get statisticsInfo() {
    return this._statisticsInfo == null && (this._statisticsInfo = {}), this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo), Object.assign({}, this._statisticsInfo);
  }
  _fillStatisticsInfo(t) {
    if (t.playerType = this._type, !(this._mediaElement instanceof HTMLVideoElement))
      return t;
    let n = !0, r = 0, l = 0;
    if (this._mediaElement.getVideoPlaybackQuality) {
      let a = this._mediaElement.getVideoPlaybackQuality();
      r = a.totalVideoFrames, l = a.droppedVideoFrames;
    } else
      this._mediaElement.webkitDecodedFrameCount != null ? (r = this._mediaElement.webkitDecodedFrameCount, l = this._mediaElement.webkitDroppedFrameCount) : n = !1;
    return n && (t.decodedFrames = r, t.droppedFrames = l), t;
  }
  _onmseUpdateEnd() {
    if (!this._config.lazyLoad || this._config.isLive)
      return;
    let t = this._mediaElement.buffered, n = this._mediaElement.currentTime, r = 0;
    for (let l = 0; l < t.length; l++) {
      let a = t.start(l), e = t.end(l);
      if (a <= n && n < e) {
        r = e;
        break;
      }
    }
    r >= n + this._config.lazyLoadMaxDuration && this._progressChecker == null && (Log.v(this.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), this._suspendTransmuxer());
  }
  _onmseBufferFull() {
    Log.v(this.TAG, "MSE SourceBuffer is full, suspend transmuxing task"), this._progressChecker == null && this._suspendTransmuxer();
  }
  _suspendTransmuxer() {
    this._transmuxer && (this._transmuxer.pause(), this._progressChecker == null && (this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1e3)));
  }
  _checkProgressAndResume() {
    let t = this._mediaElement.currentTime, n = this._mediaElement.buffered, r = !1;
    for (let l = 0; l < n.length; l++) {
      let a = n.start(l), e = n.end(l);
      if (t >= a && t < e) {
        t >= e - this._config.lazyLoadRecoverDuration && (r = !0);
        break;
      }
    }
    r && (window.clearInterval(this._progressChecker), this._progressChecker = null, r && (Log.v(this.TAG, "Continue loading from paused position"), this._transmuxer.resume()));
  }
  _isTimepointBuffered(t) {
    let n = this._mediaElement.buffered;
    for (let r = 0; r < n.length; r++) {
      let l = n.start(r), a = n.end(r);
      if (t >= l && t < a)
        return !0;
    }
    return !1;
  }
  _internalSeek(t) {
    let n = this._isTimepointBuffered(t), r = !1, l = 0;
    if (t < 1 && this._mediaElement.buffered.length > 0) {
      let a = this._mediaElement.buffered.start(0);
      (a < 1 && t < a || Browser.safari) && (r = !0, l = Browser.safari ? 0.1 : a);
    }
    if (r)
      this._requestSetTime = !0, this._mediaElement.currentTime = l;
    else if (n) {
      if (!this._alwaysSeekKeyframe)
        this._requestSetTime = !0, this._mediaElement.currentTime = t;
      else {
        let a = this._msectl.getNearestKeyframe(Math.floor(t * 1e3));
        this._requestSetTime = !0, a != null ? this._mediaElement.currentTime = a.dts / 1e3 : this._mediaElement.currentTime = t;
      }
      this._progressChecker != null && this._checkProgressAndResume();
    } else
      this._progressChecker != null && (window.clearInterval(this._progressChecker), this._progressChecker = null), this._msectl.seek(t), this._transmuxer.seek(Math.floor(t * 1e3)), this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement.currentTime = t);
  }
  _checkAndApplyUnbufferedSeekpoint() {
    if (this._seekpointRecord)
      if (this._seekpointRecord.recordTime <= this._now() - 100) {
        let t = this._mediaElement.currentTime;
        this._seekpointRecord = null, this._isTimepointBuffered(t) || (this._progressChecker != null && (window.clearTimeout(this._progressChecker), this._progressChecker = null), this._msectl.seek(t), this._transmuxer.seek(Math.floor(t * 1e3)), this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement.currentTime = t));
      } else
        window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
  }
  _checkAndResumeStuckPlayback(t) {
    let n = this._mediaElement;
    if (t || !this._receivedCanPlay || n.readyState < 2) {
      let r = n.buffered;
      r.length > 0 && n.currentTime < r.start(0) && (Log.w(this.TAG, `Playback seems stuck at ${n.currentTime}, seek to ${r.start(0)}`), this._requestSetTime = !0, this._mediaElement.currentTime = r.start(0), this._mediaElement.removeEventListener("progress", this.e.onvProgress));
    } else
      this._mediaElement.removeEventListener("progress", this.e.onvProgress);
  }
  _onvLoadedMetadata(t) {
    this._pendingSeekTime != null && (this._mediaElement.currentTime = this._pendingSeekTime, this._pendingSeekTime = null);
  }
  _onvSeeking(t) {
    let n = this._mediaElement.currentTime, r = this._mediaElement.buffered;
    if (this._requestSetTime) {
      this._requestSetTime = !1;
      return;
    }
    if (n < 1 && r.length > 0) {
      let l = r.start(0);
      if (l < 1 && n < l || Browser.safari) {
        this._requestSetTime = !0, this._mediaElement.currentTime = Browser.safari ? 0.1 : l;
        return;
      }
    }
    if (this._isTimepointBuffered(n)) {
      if (this._alwaysSeekKeyframe) {
        let l = this._msectl.getNearestKeyframe(Math.floor(n * 1e3));
        l != null && (this._requestSetTime = !0, this._mediaElement.currentTime = l.dts / 1e3);
      }
      this._progressChecker != null && this._checkProgressAndResume();
      return;
    }
    this._seekpointRecord = {
      seekPoint: n,
      recordTime: this._now()
    }, window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
  }
  _onvCanPlay(t) {
    this._receivedCanPlay = !0, this._mediaElement.removeEventListener("canplay", this.e.onvCanPlay);
  }
  _onvStalled(t) {
    this._checkAndResumeStuckPlayback(!0);
  }
  _onvProgress(t) {
    this._checkAndResumeStuckPlayback();
  }
  flush(t) {
    this._msectl.seek(0), window.clearInterval(this._progressChecker), this._internalSeek(0), this._mediaElement.currentTime = 0, this._requestSetTime = !0, this._pendingSeekTime = null, this._transmuxer._controller._remuxer.seek(0), this._transmuxer._controller._remuxer.insertDiscontinuity();
  }
}
class NativePlayer {
  constructor(t, n) {
    if (this.TAG = "NativePlayer", this._type = "NativePlayer", this._emitter = new EventEmitter$1(), this._config = createDefaultConfig(), typeof n == "object" && Object.assign(this._config, n), t.type.toLowerCase() === "flv")
      throw new InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");
    if (t.hasOwnProperty("segments"))
      throw new InvalidArgumentException(`NativePlayer(${t.type}) doesn't support multipart playback!`);
    this.e = {
      onvLoadedMetadata: this._onvLoadedMetadata.bind(this)
    }, this._pendingSeekTime = null, this._statisticsReporter = null, this._mediaDataSource = t, this._mediaElement = null;
  }
  destroy() {
    this._mediaElement && (this.unload(), this.detachMediaElement()), this.e = null, this._mediaDataSource = null, this._emitter.removeAllListeners(), this._emitter = null;
  }
  on(t, n) {
    t === PlayerEvents.MEDIA_INFO ? this._mediaElement != null && this._mediaElement.readyState !== 0 && Promise.resolve().then(() => {
      this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);
    }) : t === PlayerEvents.STATISTICS_INFO && this._mediaElement != null && this._mediaElement.readyState !== 0 && Promise.resolve().then(() => {
      this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);
    }), this._emitter.addListener(t, n);
  }
  off(t, n) {
    this._emitter.removeListener(t, n);
  }
  attachMediaElement(t) {
    if (this._mediaElement = t, t.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._pendingSeekTime != null)
      try {
        t.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
      } catch {
      }
  }
  detachMediaElement() {
    this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src"), this._mediaElement.removeEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._mediaElement = null), this._statisticsReporter != null && (window.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
  }
  load() {
    if (!this._mediaElement)
      throw new IllegalStateException("HTMLMediaElement must be attached before load()!");
    this._mediaElement.src = this._mediaDataSource.url, this._mediaElement.readyState > 0 && (this._mediaElement.currentTime = 0), this._mediaElement.preload = "auto", this._mediaElement.load(), this._statisticsReporter = window.setInterval(
      this._reportStatisticsInfo.bind(this),
      this._config.statisticsInfoReportInterval
    );
  }
  unload() {
    this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src")), this._statisticsReporter != null && (window.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
  }
  play() {
    return this._mediaElement.play();
  }
  pause() {
    this._mediaElement.pause();
  }
  get type() {
    return this._type;
  }
  get buffered() {
    return this._mediaElement.buffered;
  }
  get duration() {
    return this._mediaElement.duration;
  }
  get volume() {
    return this._mediaElement.volume;
  }
  set volume(t) {
    this._mediaElement.volume = t;
  }
  get muted() {
    return this._mediaElement.muted;
  }
  set muted(t) {
    this._mediaElement.muted = t;
  }
  get currentTime() {
    return this._mediaElement ? this._mediaElement.currentTime : 0;
  }
  set currentTime(t) {
    this._mediaElement ? this._mediaElement.currentTime = t : this._pendingSeekTime = t;
  }
  get mediaInfo() {
    let n = {
      mimeType: (this._mediaElement instanceof HTMLAudioElement ? "audio/" : "video/") + this._mediaDataSource.type
    };
    return this._mediaElement && (n.duration = Math.floor(this._mediaElement.duration * 1e3), this._mediaElement instanceof HTMLVideoElement && (n.width = this._mediaElement.videoWidth, n.height = this._mediaElement.videoHeight)), n;
  }
  get statisticsInfo() {
    let t = {
      playerType: this._type,
      url: this._mediaDataSource.url
    };
    if (!(this._mediaElement instanceof HTMLVideoElement))
      return t;
    let n = !0, r = 0, l = 0;
    if (this._mediaElement.getVideoPlaybackQuality) {
      let a = this._mediaElement.getVideoPlaybackQuality();
      r = a.totalVideoFrames, l = a.droppedVideoFrames;
    } else
      this._mediaElement.webkitDecodedFrameCount != null ? (r = this._mediaElement.webkitDecodedFrameCount, l = this._mediaElement.webkitDroppedFrameCount) : n = !1;
    return n && (t.decodedFrames = r, t.droppedFrames = l), t;
  }
  _onvLoadedMetadata(t) {
    this._pendingSeekTime != null && (this._mediaElement.currentTime = this._pendingSeekTime, this._pendingSeekTime = null), this._emitter.emit(PlayerEvents.MEDIA_INFO, this.mediaInfo);
  }
  _reportStatisticsInfo() {
    this._emitter.emit(PlayerEvents.STATISTICS_INFO, this.statisticsInfo);
  }
}
Polyfill.install();
function createPlayer(f, t) {
  let n = f;
  if (n == null || typeof n != "object")
    throw new InvalidArgumentException(
      "MediaDataSource must be an javascript object!"
    );
  if (!n.hasOwnProperty("type"))
    throw new InvalidArgumentException(
      "MediaDataSource must has type field to indicate video file type!"
    );
  switch (n.type) {
    case "flv":
      return new FlvPlayer(n, t);
    default:
      return new NativePlayer(n, t);
  }
}
function isSupported() {
  return Features.supportMSEH264Playback();
}
function getFeatureList() {
  return Features.getFeatureList();
}
let flvjs = {};
flvjs.createPlayer = createPlayer;
flvjs.isSupported = isSupported;
flvjs.getFeatureList = getFeatureList;
flvjs.BaseLoader = BaseLoader;
flvjs.LoaderStatus = LoaderStatus;
flvjs.LoaderErrors = LoaderErrors;
flvjs.Events = PlayerEvents;
flvjs.ErrorTypes = ErrorTypes;
flvjs.ErrorDetails = ErrorDetails;
flvjs.FlvPlayer = FlvPlayer;
flvjs.NativePlayer = NativePlayer;
flvjs.LoggingControl = LoggingControl;
console.error = () => {
};
Object.defineProperty(flvjs, "version", {
  enumerable: !0,
  get: function() {
    return __VERSION__;
  }
});
class Resampler {
  constructor(t, n, r, l) {
    if (!t || !n || !r)
      throw new Error("Invalid settings specified for the resampler.");
    this.resampler = null, this.fromSampleRate = t, this.toSampleRate = n, this.channels = r || 0, this.inputBufferSize = l, this.initialize();
  }
  initialize() {
    this.fromSampleRate == this.toSampleRate ? (this.resampler = (t) => t, this.ratioWeight = 1) : (this.fromSampleRate < this.toSampleRate ? (this.linearInterpolation(), this.lastWeight = 1) : (this.multiTap(), this.tailExists = !1, this.lastWeight = 0), this.initializeBuffers(), this.ratioWeight = this.fromSampleRate / this.toSampleRate);
  }
  bufferSlice(t) {
    try {
      return this.outputBuffer.subarray(0, t);
    } catch {
      try {
        return this.outputBuffer.length = t, this.outputBuffer;
      } catch {
        return this.outputBuffer.slice(0, t);
      }
    }
  }
  initializeBuffers() {
    this.outputBufferSize = Math.ceil(
      this.inputBufferSize * this.toSampleRate / this.fromSampleRate / this.channels * 1.0000004768371582
    ) + this.channels + this.channels;
    try {
      this.outputBuffer = new Float32Array(this.outputBufferSize), this.lastOutput = new Float32Array(this.channels);
    } catch {
      this.outputBuffer = [], this.lastOutput = [];
    }
  }
  linearInterpolation() {
    this.resampler = (t) => {
      let n = t.length;
      const r = this.channels;
      let l, a, e, g, _, y;
      if (n % r !== 0)
        throw new Error("Buffer was of incorrect sample length.");
      if (n <= 0)
        return [];
      const x = this.outputBufferSize, E = this.ratioWeight;
      l = this.lastWeight, a = 0, e = 0, g = 0, _ = 0;
      const C = this.outputBuffer;
      for (; l < 1; l += E)
        for (e = l % 1, a = 1 - e, this.lastWeight = l % 1, y = 0; y < this.channels; ++y)
          C[_++] = this.lastOutput[y] * a + t[y] * e;
      for (l -= 1, n -= r, g = Math.floor(l) * r; _ < x && g < n; ) {
        for (e = l % 1, a = 1 - e, y = 0; y < this.channels; ++y)
          C[_++] = t[g + (y > 0 ? y : 0)] * a + t[g + (r + y)] * e;
        l += E, g = Math.floor(l) * r;
      }
      for (y = 0; y < r; ++y)
        this.lastOutput[y] = t[g++];
      return this.bufferSlice(_);
    };
  }
  multiTap() {
    this.resampler = (t) => {
      const n = t.length, r = this.channels;
      let l, a, e, g, _, y, x;
      if (n % r !== 0)
        throw new Error("Buffer was of incorrect sample length.");
      if (n <= 0)
        return [];
      const E = this.outputBufferSize, C = [], L = this.ratioWeight;
      l = 0, e = 0, g = 0, _ = !this.tailExists, this.tailExists = !1;
      const A = this.outputBuffer;
      for (y = 0, x = 0, a = 0; a < r; ++a)
        C[a] = 0;
      do {
        if (_)
          for (l = L, a = 0; a < r; ++a)
            C[a] = 0;
        else {
          for (l = this.lastWeight, a = 0; a < r; ++a)
            C[a] = this.lastOutput[a];
          _ = !0;
        }
        for (; l > 0 && e < n; )
          if (g = 1 + e - x, l >= g) {
            for (a = 0; a < r; ++a)
              C[a] += t[e++] * g;
            x = e, l -= g;
          } else {
            for (a = 0; a < r; ++a)
              C[a] += t[e + (a > 0 ? a : 0)] * l;
            x += l, l = 0;
            break;
          }
        if (l === 0)
          for (a = 0; a < r; ++a)
            A[y++] = C[a] / L;
        else {
          for (this.lastWeight = l, a = 0; a < r; ++a)
            this.lastOutput[a] = C[a];
          this.tailExists = !0;
          break;
        }
      } while (e < n && y < E);
      return this.bufferSlice(y);
    };
  }
  resample(t) {
    return this.fromSampleRate == this.toSampleRate ? this.ratioWeight = 1 : (this.fromSampleRate < this.toSampleRate ? this.lastWeight = 1 : (this.tailExists = !1, this.lastWeight = 0), this.initializeBuffers(), this.ratioWeight = this.fromSampleRate / this.toSampleRate), this.resampler(t);
  }
}
window.URL = window.URL || window.webkitURL;
const navigator$1 = window.navigator;
navigator$1.mediaDevices && (navigator$1.mediaDevices.getUserMedia = navigator$1.mediaDevices.getUserMedia || navigator$1.webkitGetUserMedia || navigator$1.mozGetUserMedia || navigator$1.msGetUserMedia);
class HZRecorderReal {
  constructor(t, n) {
    let r;
    this.config = n || {}, this.config.sampleBits = 16, this.config.sampleRate = 16e3, this.config.channelCount = 1;
    const l = new (window.webkitAudioContext || window.AudioContext)(), a = l.createMediaStreamSource(t), g = (l.createScriptProcessor || l.createJavaScriptNode).apply(l, [4096, 1, 1]), _ = {
      size: 0,
      // 录音文件长度
      buffer: [],
      // 录音缓存, Array of Float32Array
      sampleRate: l.sampleRate,
      // 输入采样率
      input: function(y) {
        this.buffer.push(new Float32Array(y)), this.size += y.length;
      },
      resample: function(y, x = 16e3) {
        return new Resampler(
          this.sampleRate,
          x,
          1,
          y.length
        ).resample(y);
      },
      resampleAndEncodeWAV: function(y = 16e3, x = 16, E = 0, C = -1) {
        let L = this.buffer.map((P) => this.resample(P, y)).reduce((P, $) => [...P, ...$], []);
        const A = y * E;
        let I = L.length;
        C >= 0 && (I = y * C), L = L.slice(A, I);
        const D = L.length * (x / 8), w = new ArrayBuffer(44 + D), S = new DataView(w), O = 1;
        let F = 0;
        const j = function(P) {
          for (let $ = 0; $ < P.length; $++)
            S.setUint8(F + $, P.charCodeAt($));
        };
        if (j("RIFF"), F += 4, S.setUint32(F, 36 + D, !0), F += 4, j("WAVE"), F += 4, j("fmt "), F += 4, S.setUint32(F, 16, !0), F += 4, S.setUint16(F, 1, !0), F += 2, S.setUint16(F, O, !0), F += 2, S.setUint32(F, y, !0), F += 4, S.setUint32(F, O * y * (x / 8), !0), F += 4, S.setUint16(F, O * (x / 8), !0), F += 2, S.setUint16(F, x, !0), F += 2, j("data"), F += 4, S.setUint32(F, D, !0), F += 4, x === 8)
          for (let P = 0; P < L.length; P++, F++) {
            const $ = Math.max(-1, Math.min(1, L[P]));
            let V = $ < 0 ? $ * 32768 : $ * 32767;
            V = 255 / (65535 / (V + 32768)), S.setInt8(F, V);
          }
        else
          for (let P = 0; P < L.length; P++, F += 2) {
            const $ = Math.max(-1, Math.min(1, L[P]));
            S.setInt16(F, $ < 0 ? $ * 32768 : $ * 32767, !0);
          }
        return new Blob([S], { type: "audio/wav" });
      },
      quantize: function(y, x = 16) {
        const E = y.length * (x / 8), C = new DataView(new ArrayBuffer(E));
        let L = 0;
        if (x === 8)
          for (let A = 0; A < y.length; A++, L++) {
            const I = Math.max(-1, Math.min(1, y[A]));
            let D = I < 0 ? I * 32768 : I * 32767;
            D = 255 / (65535 / (D + 32768)), C.setInt8(L, D);
          }
        else
          for (let A = 0; A < y.length; A++, L += 2) {
            const I = Math.max(-1, Math.min(1, y[A]));
            C.setInt16(L, I < 0 ? I * 32768 : I * 32767, !0);
          }
        return C;
      }
    };
    this.start = function() {
      r = !0, a.connect(g), g.connect(l.destination);
    }, this.pause = function() {
      r = !1, g.disconnect(), l.suspend();
    }, this.resume = function() {
      r = !0, l.resume(), a.connect(g), g.connect(l.destination);
    }, this.stop = function() {
      r = !1, g.disconnect(), l.close(), t == null || t.getTracks().forEach((y) => y.stop()), console.log("stop");
    }, this.getTrimBlob = function(y = 0, x = -1) {
      return this.stop(), console.log("getTrimBlob"), _.resampleAndEncodeWAV(16e3, 16, y, x);
    }, this.getBlob = function() {
      return this.stop(), _.resampleAndEncodeWAV();
    }, this.upload = function(y) {
      new window.FormData().append("file", this.getBlob());
    }, this.play = function() {
      const y = document.querySelector("audio");
      y && (y.src = window.URL.createObjectURL(this.getBlob()));
    }, this.asrCallback = function(y) {
      console.log(y);
    }, g.onaudioprocess = function(y) {
      if (!r)
        return;
      const x = y.inputBuffer.getChannelData(0), E = _.resample(x), C = _.quantize(E, 16);
      n.blobSend(C.buffer);
    };
  }
}
HZRecorderReal.prototype.throwError = function(f) {
  throw console.log(f), Error(f);
};
var ro;
HZRecorderReal.prototype.canRecording = ((ro = navigator$1.mediaDevices) == null ? void 0 : ro.getUserMedia) != null;
HZRecorderReal.prototype.get = function(f, t) {
  if (f)
    if (navigator$1.mediaDevices && navigator$1.mediaDevices.getUserMedia)
      navigator$1.mediaDevices.getUserMedia({ audio: !0 }).then((n) => {
        const r = new HZRecorderReal(n, t);
        f(r);
      }).catch((n) => {
        switch (t.openErr && t.openErr(), n.code || n.name) {
          case "PERMISSION_DENIED":
          case "PermissionDeniedError":
            HZRecorderReal.prototype.throwError("用户拒绝提供信息。");
            break;
          case "NOT_SUstreamBlobPPORTED_ERROR":
          case "NotSupportedError":
            HZRecorderReal.prototype.throwError("浏览器不支持硬件设备。");
            break;
          case "MANDATORY_UNSATISFIED_ERROR":
          case "MandatoryUnsatisfiedError":
            HZRecorderReal.prototype.throwError("无法发现指定的硬件设备。");
            break;
          default:
            HZRecorderReal.prototype.throwError(
              "无法打开麦克风。异常信息:" + n
            );
            break;
        }
      });
    else {
      HZRecorderReal.prototype.throwError("当前浏览器不支持录音功能。");
      return;
    }
};
function jsRecorder(f, t, n) {
  var r;
  function l() {
    HZRecorderReal.prototype.get(
      (g) => {
        console.log("send-success"), r = g, r == null || r.start(), t();
      },
      {
        blobSend: (g) => {
          f(g);
        },
        openErr: n
      }
    );
  }
  function a() {
    r == null || r.stop();
  }
  function e() {
    r == null || r.stop(), setTimeout(() => {
      r == null || r.start();
    }, 40);
  }
  return {
    recStart: l,
    recStop: a,
    recRecord: e
  };
}
const micro$1 = (f, t) => {
  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    let { recStart: n, recStop: r, recRecord: l } = jsRecorder(function(a) {
      f(a);
    }, () => {
      t({ type: "1", val: "获取麦克权限成功" });
    }, () => {
      t({ type: "0", val: "获取麦克权限失败" });
    });
    return {
      recStart: n,
      recStop: r,
      recRecord: l
    };
  } else
    t({ type: "0", val: "环境不支持！" });
};
function asrWs(f) {
  let t = null;
  const { recStart: n, recStop: r, recRecord: l } = micro$1(function(_) {
    try {
      if ((t == null ? void 0 : t.readyState) == 1) {
        let y = new ArrayBuffer(_.byteLength + 3), x = new Uint8Array(y), E = new Uint8Array(_);
        x.set(new Uint8Array([65, 83, 82]), 0), x.set(E, 3), t.send(x);
      }
    } catch (y) {
      console.log(y);
    }
  }, function(_) {
    _.type == "1" && f(_);
  }) || {};
  return {
    asrDestroy: () => {
      r && r(), t = null;
    },
    asrWsAppoint: (_) => {
      t = _;
    },
    asrStart: () => {
      n && n();
    }
  };
}
const slientVideoLength = (f, t) => {
  let n = null;
  function r() {
    f.buffered.length > 0 && f.buffered.end(0) > 0.6 ? t() : n = setTimeout(r, 100);
  }
  return {
    start: function() {
      n && clearTimeout(n), r();
    },
    end: function() {
      n && clearTimeout(n), n = null;
    }
  };
}, webglCut$1 = {
  status: !0,
  curVideo: null,
  lastTime: null,
  load(f, t, n, r, l) {
    this.curVideo = this.video = f, this.slient = t, this.canvas = n, this.gl = this.canvas.getContext("webgl2") || this.canvas.getContext("webgl") || this.canvas.getContext("experimental-webgl");
    const a = this;
    this.slientVideoClient = slientVideoLength(t, () => {
      a.slient && a.slient.getAttribute("src") && (a.endWebcam(), a.slient && a.slient.play().then((I) => {
        console.log("切换静音视频播放成功");
      }).catch((I) => {
        console.log("切换静音视频播放失败", I);
      }), a.slient && (a.curVideo = a.slient), a.curVideo && a.startWebcam());
    });
    const e = this.gl, g = e.createShader(e.VERTEX_SHADER);
    e.shaderSource(
      g,
      "attribute vec2 c; void main(void) { gl_Position=vec4(c, 0.0, 1.0); }"
    ), e.compileShader(g);
    const _ = e.createShader(e.FRAGMENT_SHADER);
    let y = `
        precision mediump float;
        uniform sampler2D tex;
        uniform float texWidth;
        uniform float texHeight;
        const vec3 keyColor = vec3(0.47, 1.0, 0.47);
        uniform float similarity;
        uniform float smoothness;
        uniform float spill;
        vec2 RGBtoUV(vec3 rgb) {
          return vec2(
            rgb.r * -0.169 + rgb.g * -0.331 + rgb.b *  0.5    + 0.5,
            rgb.r *  0.5   + rgb.g * -0.419 + rgb.b * -0.081  + 0.5
          );
        }
        vec4 GetRgba(float detaX, float detaY) {
          vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);
          vec4 rgba = texture2D(tex, texCoord);
          float green = rgba.g - max(rgba.r, rgba.b);
          float greenKey = keyColor.g - max(keyColor.r, keyColor.b);
          float mask = smoothstep(greenKey-0.1, 0.0, green);
          rgba.a = mask;
          return rgba;
        }
        vec4 ProcessChromaKey() {
          vec4 rgba = GetRgba(0.0, 0.0);
          if (rgba.a > 0.0 && rgba.a < 1.0) {
            vec4 rgbas[9];
            float maxMask = 0.0;
            vec4 minRgba = rgba;
            for (int i = -1; i <= 1; i++) {
              for (int j = -1; j <= 1; j++) {
                vec4 tmp;
                if (i == 0 && j == 0) {
                  tmp = rgba;
                } else {
                  tmp = GetRgba(float(i), float(j));
                }
                rgbas[(i+1)*3 + (j+1)] = tmp;
                if (tmp.a > maxMask) {
                  maxMask = tmp.a;
                  minRgba = tmp;
                }
              }
            }
            rgbas[4] = minRgba;
            rgbas[4].a = rgba.a;
            vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);

            float gs[9];
            gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
            gs[1] = gs[3] = gs[5] = gs[7] = 0.05;
            gs[4] = 0.6;
            for(int i = 0; i < 9; i++) {
              dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];
            }

            gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
            gs[1] = gs[3] = gs[5] = gs[7] = 0.15;
            gs[4] = 0.2;
            for(int i = 0; i < 9; i++) {
              dest.a = dest.a + rgbas[i].a* gs[i];
            }
            rgba.rgb = dest.rgb;
            rgba.a = dest.a;
            if (rgba.g > rgba.r && rgba.g > rgba.b) {
              rgba.g = max(rgba.r, rgba.b);
            }
            rgba.rgb = rgba.rgb * rgba.a;
          } else {
            rgba.rgb = rgba.rgb * rgba.a;
          }
          return rgba;
        }

        void main(void) {
          gl_FragColor = ProcessChromaKey();
        }
      `;
    l == "fragment-shader-nocut" && (y = `
        precision mediump float;
        uniform sampler2D tex;
        uniform float texWidth;
        uniform float texHeight;

        void main(void) {
          vec2 texCoord = vec2(gl_FragCoord.x/texWidth, 1.0 - (gl_FragCoord.y/texHeight));
          gl_FragColor =texture2D(tex, texCoord);
        }
      `), e.shaderSource(_, y), e.compileShader(_);
    const x = e.createProgram();
    e.attachShader(x, g), e.attachShader(x, _), e.linkProgram(x), e.useProgram(x);
    const E = e.createBuffer();
    e.bindBuffer(e.ARRAY_BUFFER, E), e.bufferData(
      e.ARRAY_BUFFER,
      new Float32Array([-1, 1, -1, -1, 1, -1, 1, 1]),
      e.STATIC_DRAW
    );
    const C = e.getAttribLocation(x, "c");
    e.vertexAttribPointer(C, 2, e.FLOAT, !1, 0, 0), e.enableVertexAttribArray(C), e.activeTexture(e.TEXTURE0);
    const L = e.createTexture();
    e.bindTexture(e.TEXTURE_2D, L), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.LINEAR), this.texLoc = e.getUniformLocation(x, "tex"), this.texWidthLoc = e.getUniformLocation(x, "texWidth"), this.texHeightLoc = e.getUniformLocation(x, "texHeight"), this.keyColorLoc = e.getUniformLocation(x, "keyColor"), this.similarityLoc = e.getUniformLocation(x, "similarity"), this.smoothnessLoc = e.getUniformLocation(x, "smoothness"), this.spillLoc = e.getUniformLocation(x, "spill"), r();
  },
  slicePlay() {
    this.slientVideoClient.start();
  },
  videoPlay() {
    this.endWebcam(), this.slient && this.slient.pause(), this.video && (this.curVideo = this.video), this.curVideo && this.startWebcam();
  },
  startWebcam() {
    const f = this;
    f.status = !0;
    const t = this.gl;
    function n(r, l) {
      if (!f.curVideo) {
        f.status && requestAnimationFrame(n);
        return;
      }
      let a = parseInt(performance.now());
      if (f.lastTime && a - f.lastTime <= 30) {
        requestAnimationFrame(n);
        return;
      }
      f.lastTime = a;
      const e = (f.curVideo || f.slient).getAttribute("width"), g = (f.curVideo || f.slient).getAttribute("height");
      t.viewport(0, 0, e, g), t.texImage2D(
        t.TEXTURE_2D,
        0,
        t.RGBA,
        t.RGBA,
        t.UNSIGNED_BYTE,
        f.curVideo
      ), t.uniform1i(f.texLoc, 0), t.uniform1f(f.texWidthLoc, e), t.uniform1f(f.texHeightLoc, g);
      const _ = "00ff00";
      t.uniform3f(
        f.keyColorLoc,
        parseInt(_.substr(0, 2), 16) / 255,
        parseInt(_.substr(2, 2), 16) / 255,
        parseInt(_.substr(4, 2), 16) / 255
      ), t.uniform1f(f.similarityLoc, parseFloat(0.4)), t.uniform1f(f.smoothnessLoc, parseFloat(0.1)), t.uniform1f(f.spillLoc, parseFloat(0.2)), t.drawArrays(t.TRIANGLE_FAN, 0, 4), f.status && requestAnimationFrame(n);
    }
    requestAnimationFrame(n);
  },
  startWebcamOutline(f, t) {
    this.canvas;
    const n = this.video, r = this.gl, l = this;
    l.status = !0;
    function a(e, g) {
      r.viewport(0, 0, f, t), r.texImage2D(
        r.TEXTURE_2D,
        0,
        r.RGB,
        r.RGB,
        r.UNSIGNED_BYTE,
        n
      ), r.uniform1i(l.texLoc, 0), r.uniform1f(l.texWidthLoc, f), r.uniform1f(l.texHeightLoc, t);
      const _ = "00ff00";
      r.uniform3f(
        l.keyColorLoc,
        parseInt(_.substr(0, 2), 16) / 255,
        parseInt(_.substr(2, 2), 16) / 255,
        parseInt(_.substr(4, 2), 16) / 255
      ), r.uniform1f(l.similarityLoc, parseFloat(0.4)), r.uniform1f(l.smoothnessLoc, parseFloat(0.1)), r.uniform1f(l.spillLoc, parseFloat(0.1)), r.drawArrays(r.TRIANGLE_FAN, 0, 4), l.status && requestAnimationFrame(a);
    }
    requestAnimationFrame(a);
  },
  endWebcam() {
    var f;
    this.status = !1, (f = this.slientVideoClient) == null || f.end();
  },
  destroy() {
    var f;
    this.status = !1, (f = this.slientVideoClient) == null || f.end(), this.slientVideoClient = null, this.curVideo = this.video = null, this.slient = null, this.canvas = null, this.gl = null;
  }
};
window.webglCut = webglCut$1;
let Emitter$2 = class {
  on(t, n, r) {
    const l = this.e || (this.e = {});
    return (l[t] || (l[t] = [])).push({ fn: n, ctx: r }), this;
  }
  once(t, n, r) {
    const l = this;
    function a(...e) {
      l.off(t, a), n.apply(r, e);
    }
    return a._ = n, this.on(t, a, r);
  }
  emit(t, ...n) {
    const r = ((this.e || (this.e = {}))[t] || []).slice();
    for (let l = 0; l < r.length; l += 1)
      r[l].fn.apply(r[l].ctx, n);
    return this;
  }
  off(t, n) {
    const r = this.e || (this.e = {}), l = r[t], a = [];
    if (l && n)
      for (let e = 0, g = l.length; e < g; e += 1)
        l[e].fn !== n && l[e].fn._ !== n && a.push(l[e]);
    return a.length ? r[t] = a : delete r[t], this;
  }
};
new Blob([new Uint8Array([255, 227, 24, 196, 0, 0, 0, 3, 72, 1, 64, 0, 0, 4, 132, 16, 31, 227, 192, 225, 76, 255, 67, 12, 255, 221, 27, 255, 228, 97, 73, 63, 255, 195, 131, 69, 192, 232, 223, 255, 255, 207, 102, 239, 255, 255, 255, 101, 158, 206, 70, 20, 59, 255, 254, 95, 70, 149, 66, 4, 16, 128, 0, 2, 2, 32, 240, 138, 255, 36, 106, 183, 255, 227, 24, 196, 59, 11, 34, 62, 80, 49, 135, 40, 0, 253, 29, 191, 209, 200, 141, 71, 7, 255, 252, 152, 74, 15, 130, 33, 185, 6, 63, 255, 252, 195, 70, 203, 86, 53, 15, 255, 255, 247, 103, 76, 121, 64, 32, 47, 255, 34, 227, 194, 209, 138, 76, 65, 77, 69, 51, 46, 57, 55, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 255, 227, 24, 196, 73, 13, 153, 210, 100, 81, 135, 56, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170])], { type: "audio/mpeg" });
new Blob([new Uint8Array([0, 0, 0, 28, 102, 116, 121, 112, 105, 115, 111, 109, 0, 0, 2, 0, 105, 115, 111, 109, 105, 115, 111, 50, 109, 112, 52, 49, 0, 0, 0, 8, 102, 114, 101, 101, 0, 0, 2, 239, 109, 100, 97, 116, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 2, 194, 109, 111, 111, 118, 0, 0, 0, 108, 109, 118, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 232, 0, 0, 0, 47, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 236, 116, 114, 97, 107, 0, 0, 0, 92, 116, 107, 104, 100, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 101, 100, 116, 115, 0, 0, 0, 28, 101, 108, 115, 116, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 47, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 100, 109, 100, 105, 97, 0, 0, 0, 32, 109, 100, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 68, 0, 0, 8, 0, 85, 196, 0, 0, 0, 0, 0, 45, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0, 0, 0, 1, 15, 109, 105, 110, 102, 0, 0, 0, 16, 115, 109, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 100, 105, 110, 102, 0, 0, 0, 28, 100, 114, 101, 102, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1, 0, 0, 0, 211, 115, 116, 98, 108, 0, 0, 0, 103, 115, 116, 115, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 87, 109, 112, 52, 97, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 0, 172, 68, 0, 0, 0, 0, 0, 51, 101, 115, 100, 115, 0, 0, 0, 0, 3, 128, 128, 128, 34, 0, 2, 0, 4, 128, 128, 128, 20, 64, 21, 0, 0, 0, 0, 1, 244, 0, 0, 1, 243, 249, 5, 128, 128, 128, 2, 18, 16, 6, 128, 128, 128, 1, 2, 0, 0, 0, 24, 115, 116, 116, 115, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 28, 115, 116, 115, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 28, 115, 116, 115, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 115, 0, 0, 1, 116, 0, 0, 0, 20, 115, 116, 99, 111, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 44, 0, 0, 0, 98, 117, 100, 116, 97, 0, 0, 0, 90, 109, 101, 116, 97, 0, 0, 0, 0, 0, 0, 0, 33, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 109, 100, 105, 114, 97, 112, 112, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 105, 108, 115, 116, 0, 0, 0, 37, 169, 116, 111, 111, 0, 0, 0, 29, 100, 97, 116, 97, 0, 0, 0, 1, 0, 0, 0, 0, 76, 97, 118, 102, 53, 54, 46, 52, 48, 46, 49, 48, 49])], { type: "video/mp4" });
const viewMap = {
  1: {
    1: {
      width: 1920,
      height: 1080
    },
    2: {
      width: 1280,
      height: 720
    },
    3: {
      width: 960,
      height: 540
    },
    4: {
      width: 640,
      height: 360
    }
  },
  2: {
    1: {
      width: 1080,
      height: 1920
    },
    2: {
      width: 720,
      height: 1280
    },
    3: {
      width: 540,
      height: 960
    },
    4: {
      width: 360,
      height: 640
    }
  }
};
function querySelectorEl(f) {
  return document.querySelector(f);
}
function get_text$1(f) {
  return String.fromCharCode.apply(null, new Uint8Array(f.slice(0, 5))) == "text:" ? new TextDecoder("utf-8").decode(new Uint8Array(f.slice(5))) : "";
}
function debounce(f, t = 1e3) {
  let n = null;
  return function(r) {
    n && clearTimeout(n), n = setTimeout(function() {
      f(r);
    }, t);
  };
}
const canTypeVideoWebm = () => document.createElement("video").canPlayType("video/webm") != "", isFunction = (f) => Object.prototype.toString.call(f) == "[object Function]";
function is_weixin(f) {
  var t = f.toLowerCase();
  return t.match(/MicroMessenger/i) == "micromessenger";
}
const environment = () => {
  const { userAgent: f } = navigator;
  let t = f.match(
    /(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i
  ) || [], n;
  if (/trident/i.test(t[1]))
    return n = /\brv[ :]+(\d+)/g.exec(f) || [], `IE ${n[1] || ""}`;
  if (t[1] === "Chrome") {
    if (n = f.match(/\b(OPR|Edge)\/(\d+)/), n !== null)
      return n.slice(1).join(" ").replace("OPR", "Opera");
    if (n = f.match(/\b(Edg)\/(\d+)/), n !== null)
      return n.slice(1).join(" ").replace("Edg", "Edge (Chromium)");
  }
  return t = t[2] ? [t[1], t[2]] : [navigator.appName, navigator.appVersion, "-?"], n = f.match(/version\/(\d+)/i), n !== null && t.splice(1, 1, n[1]), t.join(" ");
}, judgeEnvironment = (() => {
  const { userAgent: f } = navigator;
  let t = environment();
  return f.includes("Mobile") && (t = t + " mobile", is_weixin(f) && (t = t + " wx")), () => t;
})();
function createWorker(f) {
  return new Worker(URL.createObjectURL(new Blob([f], { type: "application/javascript" })));
}
const wsUrl = {
  dev: "ws://10.1.204.12:9316",
  prd: "wss://aiask365.com"
}, httpUrl = {
  dev: "http://10.1.204.12:9316",
  prd: "https://aiask365.com"
};
let curWebsocket;
const commonObj = {
  _sign: "",
  _projectId: "",
  _drivertype: "tts",
  _clientId: "",
  scene: "",
  _env: "",
  _url: "",
  _volume: 1,
  _asr: !1
}, requestConf = (f, t, n, r) => {
  console.log("--------requestConf--------");
  let l = "";
  commonObj._url ? l = `${commonObj._url}` : l = httpUrl[commonObj._env], console.log(`${l}/avatar/avatarProject/id?id=${f}&isWebm=${t}`), fetch(`${l}/avatar/avatarProject/id?id=${f}&isWebm=${t}`, {
    method: "GET",
    headers: {
      "Content-type": "application/json;charset=UTF-8",
      Token: n
    }
  }).then((a) => a.json()).then((a) => {
    r(!0, a);
  }).catch((a) => {
    console.log(a), r(!1, a);
  });
}, websocketInit$1 = ({ _projectId: f, _sign: t, isPlat: n, type: r, _drivertype: l, requestVideo: a }) => {
  let e = commonObj._url.includes("https") ? "wss:" : "ws:", g = "";
  commonObj._url ? g = `${e}//${commonObj._url.split("//")[1]}` : g = wsUrl[commonObj._env];
  const _ = Date.now() + Math.random().toString(36).substr(2);
  let y = `${g}/websocket/wenyan/avatar/${f}/${t}?sendText=${n ? "1" : "0"}&sendFlv=${r}&isSdk=1&clientId=${_}`;
  if (a && (y += "&" + a), r == 0)
    return y;
  let x;
  return () => (x || (x = new WebSocket(y), x.binaryType = "arraybuffer", curWebsocket = x), x);
}, heartPing = {
  timer: null,
  pong: null,
  start(f) {
    this.timer || this.end(), this.clearTime(f);
  },
  clearTime(f) {
    const t = this;
    t.timer = setTimeout(() => {
      f(), console.log("ping!"), t.clearTime(f);
    }, 2e4);
  },
  pongTimer(f = 3) {
    const t = this;
    console.log("pong!"), t.pong && clearTimeout(t.pong), t.pong = setTimeout(() => {
      console.log("未收到pong!停止ping,重新链接");
    }, f * 1e3);
  },
  clearPong() {
    clearTimeout(this.pong);
  },
  end() {
    clearTimeout(this.pong), clearTimeout(this.timer), this.pong = null, this.timer = null;
  }
}, Json2str = (f) => JSON.stringify(f), SendMsg = {
  interrupt: () => Json2str({ signal: "interrupt" }),
  qa: (f, t) => Json2str({
    signal: "tts",
    text: t,
    query: f,
    interrupt: !0
  }),
  text: (f) => Json2str({
    signal: "tts",
    text: f,
    interrupt: !1
  }),
  streamText: (f) => Json2str({ signal: "ttsStream", text: f, interrupt: !1 }),
  streamTextStart: (f, t) => Json2str({ signal: "ttsStream", text: f, query: t, interrupt: !0 }),
  streamTextEnd: () => SendMsg.streamText(""),
  streamAudio: (f) => f,
  streamAudioEnd: () => new ArrayBuffer(1),
  pausePlay: () => Json2str({
    signal: "pausePlay"
  }),
  resumePlay: () => Json2str({
    signal: "resumePlay"
  }),
  startAsr: () => Json2str({
    signal: "startAsr"
  })
};
window == null || window.addEventListener("unload", () => {
  console.log("page unload"), curWebsocket == null || curWebsocket.close();
});
const isPlat$3 = judgeEnvironment().includes("Chrome");
let flvPlayer = null, pacemaker$3 = !1, websocket$3 = null, videoPlayerInit$2 = !1, interval$3 = 5, c2$1 = null, video = null, silentVideo$2 = null, videoWidth$3 = "", videoHeight$3 = "", reqRes$3 = null, playStatus$1 = !1, serverEnded$1 = !1, videoFlow$1 = "", videoIsStart = !1, emitter$3 = new Emitter$2();
const checkVideoStatus$1 = debounce(() => {
  console.log(
    "checkVideoStatus",
    playStatus$1,
    videoFlow$1,
    serverEnded$1
  ), playStatus$1 && videoFlow$1 == "waiting" && serverEnded$1 && (serverEnded$1 = !1, console.log("视频播完了"), emitter$3.emit("videoEnd"), videoIsStart = !1, websocket$3 == null || websocket$3.send(SendMsg.startAsr()));
}, 500), checkCondition$3 = (f) => {
  "WebSocket" in window ? flvjs.isSupported() ? f(!0, "success") : f(!1, "不支持flv") : f(!1, "当前浏览器不支持websocketio连接");
};
let startTime = 0;
const tryPlay = (() => {
  let f = null;
  function t() {
    const n = video, r = (/* @__PURE__ */ new Date()).getTime() - startTime;
    if (n) {
      if (n.buffered.length > 0 && n.buffered.end(0) > 0.8) {
        videoFlow$1 = "canplay", videoIsStart || (videoIsStart = !0, emitter$3.emit("videoStart")), n.play().then((l) => {
          console.log("数字人播放成功");
        }).catch((l) => {
          console.log("数字人播放失败", l);
        }), webglCut.videoPlay();
        return;
      } else if (r > 500) {
        videoFlow$1 = "canplay", videoIsStart || (videoIsStart = !0, emitter$3.emit("videoStart"), console.log("------videoStart", 22)), n.play().then((l) => {
          console.log("数字人播放成功");
        }).catch((l) => {
          console.log("数字人播放失败", l);
        }), webglCut.videoPlay();
        return;
      }
      f = setTimeout(t, 100);
    }
  }
  return function() {
    f && clearTimeout(f), t();
  };
})(), webReconnect$2 = (f = !1) => {
  if (f && flvPlayer) {
    flvPlayer.pause(), flvPlayer.unload(), flvPlayer.detachMediaElement(), videoPlayerInit$2 = !0, flvPlayer.attachMediaElement(video), flvPlayer.load();
    return;
  }
}, loopConnect$3 = () => {
  uninstallEvent$3(!1), startPlayer$3();
}, pageAcitveStatusGet$3 = () => {
  (() => {
    setTimeout(() => {
      interval$3 += 5, interval$3 > 30 && (interval$3 = 30), loopConnect$3();
    }, interval$3 * 1e3);
  })();
}, uninstallEvent$3 = (f = !0) => {
  pacemaker$3 = f, videoPlayerInit$2 = !1, videoIsStart = !1, heartPing.end(), flvPlayer && (flvPlayer.pause(), flvPlayer.unload(), flvPlayer.detachMediaElement(), flvPlayer.destroy(), flvPlayer = null), websocket$3 && (websocket$3.close(), websocket$3 = null);
};
let asrWsApp$3 = null;
const startPlayer$3 = () => {
  let { _sign: f, _projectId: t, _drivertype: n, _volume: r, _asr: l } = commonObj;
  flvPlayer = flvjs.createPlayer(
    {
      type: "flv",
      isLive: !0,
      //直播流
      hasAudio: !0,
      hasVideo: !0,
      cors: !0
    },
    {
      enableWorker: !1,
      enableStashBuffer: !1,
      autoCleanupSourceBuffer: !0,
      stashInitialSize: 128,
      cbOpen: function(a) {
        console.log("flv-建立websocket", a), websocket$3 = a, l && asrWsApp$3 && asrWsApp$3(a), heartPing.start(() => {
          (websocket$3 == null ? void 0 : websocket$3.readyState) == 1 && (websocket$3 == null || websocket$3.send(JSON.stringify({ signal: "ping" })));
        });
      },
      cbMessage: isPlat$3 ? function(a, e, g) {
        if (typeof e.data == "object") {
          const _ = new Uint8Array(e.data);
          _[0] !== 70 || _[1] !== 76 || _[2] !== 86 || _[3] !== 1 || (videoPlayerInit$2 = !1, console.log("——————————loop new——————————————")), videoPlayerInit$2 || (_.byteLength == 1 && _[0] == 0 && (console.log("视频发送完成"), playStatus$1 = !0, serverEnded$1 = !0, checkVideoStatus$1()), g(e));
        } else if (e.data != "ppg-end") {
          if (e.data.includes("requests overload"))
            pacemaker$3 = !0, emitter$3.emit("wsMessage", {
              type: "requests overload"
            });
          else if (e.data.includes("{")) {
            const _ = JSON.parse(e.data);
            _.type == "asr-part" ? emitter$3.emit("wsMessage", _) : _.type == "asr" ? (emitter$3.emit("wsMessage", _), playStatus$1 = !1) : _.type == "answer" ? emitter$3.emit("wsMessage", _) : _.type == "startAsr" || _.type == "startSleep" || _.type == "wakeup" || (_.type == "server_ready" ? emitter$3.emit("wsMessage", _) : _.type == "server_ended" || (_.type == "error" ? (emitter$3.emit("wsMessage", _), console.error(_.content)) : _.type == "node" || _.type == "tts_mills"));
          }
        }
      } : function(a, e, g) {
        const _ = new Uint8Array(e.data);
        if (_[0] === 116 && _[1] === 101 && _[2] === 120 && _[3] === 116) {
          const y = get_text$1(_);
          if (y != "ppg-end") {
            if (y != "pong") {
              if (y.includes("requests overload"))
                pacemaker$3 = !0, emitter$3.emit("wsMessage", {
                  type: "requests overload"
                });
              else if (y.includes("{")) {
                const x = JSON.parse(y);
                x.type == "asr-part" ? emitter$3.emit("wsMessage", x) : x.type == "asr" ? (emitter$3.emit("wsMessage", x), playStatus$1 = !1) : x.type == "answer" ? emitter$3.emit("wsMessage", x) : x.type == "startAsr" || x.type == "startSleep" || x.type == "wakeup" || (x.type == "server_ready" ? emitter$3.emit("wsMessage", x) : x.type == "server_ended" || (x.type == "error" ? (emitter$3.emit("wsMessage", x), console.error(x.content)) : x.type == "node" || x.type == "tts_mills"));
              }
            }
          }
        } else
          _[0] !== 70 || _[1] !== 76 || _[2] !== 86 || _[3] !== 1 || (videoPlayerInit$2 = !1, console.log("——————————loop new——————————————")), videoPlayerInit$2 || (_.byteLength == 1 && _[0] == 0 && (console.log("视频发送完成"), playStatus$1 = !0, serverEnded$1 = !0, checkVideoStatus$1()), g(e));
      },
      cbError: function(a, e) {
        console.error("websocket错误：", e), emitter$3.emit("wsMessage", {
          type: "websocket Error",
          value: e
        });
      },
      cbClose: function(a, e) {
        console.error("websocket关闭：", e), pacemaker$3 ? emitter$3.emit("wsMessage", {
          type: "websocket close"
        }) : (pageAcitveStatusGet$3(), emitter$3.emit("wsMessage", {
          type: "websocket reLoop"
        }));
      },
      ws: websocketInit$1({ _projectId: t, _sign: f, isPlat: isPlat$3, type: 1, _drivertype: n, requestVideo: requestVideo$3 })
    }
  ), flvPlayer.attachMediaElement(video), flvPlayer.load(), videoPlayerInit$2 = !0;
};
let requestVideo$3 = "";
function player$3(f, t, n, r, l = 1) {
  videoWidth$3 = viewMap[t][r].width, videoHeight$3 = viewMap[t][r].height, requestVideo$3 = `requestWidth=${videoWidth$3}&requestHeight=${videoHeight$3}`, document.querySelector(f).innerHTML = `
      <canvas id="flvcanvas" style="zoom:${l};" width="${videoWidth$3}" height="${videoHeight$3}"></canvas>
      <video id="digitalPlayer" width="${videoWidth$3}" height="${videoHeight$3}" hidden webkit-playsinline="true" playsinline="true" autoplay></video>
      <video id="silentVideo" width="${videoWidth$3}" height="${videoHeight$3}" src="${n}" muted loop autoplay hidden webkit-playsinline="true" playsinline="true" crossorigin="anonymous" preload="auto"></video>`, c2$1 = querySelectorEl("#flvcanvas"), video = querySelectorEl("#digitalPlayer"), silentVideo$2 = querySelectorEl("#silentVideo");
}
let xxPlayer$3 = class extends Emitter$2 {
  constructor({ environment: t, containerLable: n, token: r, projectId: l, quality: a, zoom: e, clientId: g, volume: _, asr: y }, x) {
    if (super(), y) {
      const { asrDestroy: E, asrWsAppoint: C, asrStart: L } = asrWs((A) => {
        console.log(A, "mic");
      });
      asrWsApp$3 = C, L();
    }
    emitter$3 = new Emitter$2(), this.containerLable = n, commonObj._sign = r, commonObj._projectId = l, this.quality = a || 1, this.zoom = e || 1, commonObj._env = t || "prd", commonObj._volume = _ || 1, commonObj._asr = y || !1, reqRes$3 = x, this.streamImg = !1;
  }
  init() {
    checkCondition$3((t, n) => {
      if (t) {
        let { avatarSilenceUrl: r, avatarDirection: l } = reqRes$3.data;
        player$3(this.containerLable, l, r, this.quality, this.zoom), emitter$3.on("videoEnd", () => {
          this.emit("message", { type: "videoEnd", data: {} });
        }), emitter$3.on("videoStart", () => {
          this.emit("message", { type: "videoStart", data: {} });
        }), emitter$3.on("wsMessage", (a) => {
          this.emit("message", { type: "wsMessage", data: a });
        }), emitter$3.on("initAnd", () => {
          this.emit("intialSucccess", { type: "2" });
        }), this.emit("intialSucccess", { type: "1" });
      } else
        this.emit("intialError", n);
    });
  }
  playSilentvideo() {
    video && video.play().then((t) => {
      console.log("交互数字人视频播放");
    }).catch((t) => {
      console.log("交互数字人视频播放失败-", t);
    }), silentVideo$2 && silentVideo$2.play().then((t) => {
      console.log("交互静音视频播放");
    }).catch((t) => {
      console.log("交互静音视频播放失败-", t);
    });
  }
  startPlay() {
    const t = this;
    webglCut.load(video, silentVideo$2, c2$1, (n) => {
      webglCut.slicePlay(), startPlayer$3();
    }), video == null || video.addEventListener("canplay", function() {
      startTime = (/* @__PURE__ */ new Date()).getTime(), console.log("canplay-----"), tryPlay(), t.streamImg = !0;
    }), video == null || video.addEventListener("waiting", function() {
      console.log("waiting--------"), videoFlow$1 = "waiting", webglCut.slicePlay(), checkVideoStatus$1();
    }), video == null || video.addEventListener("ended", function() {
      console.log("_____ended________"), videoFlow$1 = "waiting", webglCut.slicePlay(), checkVideoStatus$1();
    }), video == null || video.addEventListener("loadedmetadata", (n) => {
      video.pause(), console.log("_____loadedmetadata________", n);
    }), emitter$3.emit("initAnd");
  }
  setClientId(t) {
    t ? commonObj._clientId = t : console.log("clientId不能为空");
  }
  stopPlay() {
    uninstallEvent$3(), emitter$3 = null, c2$1 = null, video = null, silentVideo$2 = null, videoWidth$3 = "", videoHeight$3 = "", reqRes$3 = null, this.streamImg = !1;
  }
  playQA(t, n) {
    flvPlayer == null || flvPlayer.play(), websocket$3 == null || websocket$3.send(SendMsg.qa(t, n));
  }
  interrupt() {
    websocket$3 == null || websocket$3.send(SendMsg.interrupt()), webglCut.slicePlay(), webReconnect$2(!0), this.streamImg = !1, videoIsStart = !1;
  }
  playText(t) {
    flvPlayer == null || flvPlayer.play(), websocket$3 == null || websocket$3.send(SendMsg.text(t));
  }
  playStreamText(t) {
    websocket$3 == null || websocket$3.send(SendMsg.streamText(t));
  }
  playStreamTextStart(t, n) {
    flvPlayer == null || flvPlayer.play(), websocket$3 == null || websocket$3.send(SendMsg.streamTextStart(t, n));
  }
  playStreamTextEnd() {
    websocket$3 == null || websocket$3.send(SendMsg.streamTextEnd());
  }
  playAudio(t) {
    websocket$3 == null || websocket$3.send(SendMsg.streamAudio(t));
  }
  playAudioEnd() {
    websocket$3 == null || websocket$3.send(SendMsg.streamAudioEnd());
  }
  playCurVideo() {
    this.streamImg && (websocket$3 == null || websocket$3.send(SendMsg.resumePlay()), flvPlayer.play(), webglCut.videoPlay());
  }
  stopCurVideo() {
    this.streamImg && (websocket$3 == null || websocket$3.send(SendMsg.pausePlay()), webglCut.slicePlay(), flvPlayer.pause());
  }
};
function getNowTime$1() {
  return performance && typeof performance.now == "function" ? performance.now() : Date.now();
}
let Emitter$1 = class {
  on(t, n, r) {
    const l = this.e || (this.e = {});
    return (l[t] || (l[t] = [])).push({ fn: n, ctx: r }), this;
  }
  once(t, n, r) {
    const l = this;
    function a(...e) {
      l.off(t, a), n.apply(r, e);
    }
    return a._ = n, this.on(t, a, r);
  }
  emit(t, ...n) {
    const r = ((this.e || (this.e = {}))[t] || []).slice();
    for (let l = 0; l < r.length; l += 1)
      r[l].fn.apply(r[l].ctx, n);
    return this;
  }
  off(t, n) {
    const r = this.e || (this.e = {}), l = r[t], a = [];
    if (l && n)
      for (let e = 0, g = l.length; e < g; e += 1)
        l[e].fn !== n && l[e].fn._ !== n && a.push(l[e]);
    return a.length ? r[t] = a : delete r[t], this;
  }
};
var Sn, $n, Bn, zn, qn;
const Mn = class Mn {
  constructor(t, n) {
    Pn(this, Sn, null);
    Pn(this, $n, null);
    Pn(this, Bn, null);
    Pn(this, zn, null);
    Pn(this, qn, null);
    yn(this, Sn, n);
    const r = yn(this, $n, n.getContext("webgl2") || n.getContext("webgl") || n.getContext("experimental-webgl")), l = r.createShader(r.VERTEX_SHADER);
    if (r.shaderSource(l, Mn.vertexShaderSource), r.compileShader(l), !r.getShaderParameter(l, r.COMPILE_STATUS))
      throw r.getShaderInfoLog(l);
    const a = r.createShader(r.FRAGMENT_SHADER);
    if (r.shaderSource(a, Mn.fragmentShaderSource), r.compileShader(a), !r.getShaderParameter(a, r.COMPILE_STATUS))
      throw r.getShaderInfoLog(a);
    const e = r.createProgram();
    if (r.attachShader(e, l), r.attachShader(e, a), r.linkProgram(e), !r.getProgramParameter(e, r.LINK_STATUS))
      throw r.getProgramInfoLog(e);
    r.useProgram(e);
    const g = r.createBuffer();
    r.bindBuffer(r.ARRAY_BUFFER, g), r.bufferData(r.ARRAY_BUFFER, new Float32Array([
      -1,
      -1,
      -1,
      1,
      1,
      1,
      1,
      -1
    ]), r.STATIC_DRAW);
    const _ = r.getAttribLocation(e, "xy");
    r.vertexAttribPointer(_, 2, r.FLOAT, !1, 0, 0), r.enableVertexAttribArray(_);
    const y = r.createTexture();
    r.bindTexture(r.TEXTURE_2D, y), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.NEAREST), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.NEAREST), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), yn(this, zn, r.getUniformLocation(e, "texWidth")), yn(this, qn, r.getUniformLocation(e, "texHeight"));
  }
  draw(t, n, r) {
    _n(this, Sn).width = n, _n(this, Sn).height = r;
    const l = _n(this, $n);
    l.uniform1f(_n(this, zn), n), l.uniform1f(_n(this, qn), r), l.texImage2D(l.TEXTURE_2D, 0, l.RGBA, l.RGBA, l.UNSIGNED_BYTE, t), _n(this, Bn) != null && _n(this, Bn).close(), yn(this, Bn, t), l.viewport(0, 0, l.drawingBufferWidth, l.drawingBufferHeight), l.clearColor(1, 0, 0, 1), l.clear(l.COLOR_BUFFER_BIT), l.drawArrays(l.TRIANGLE_FAN, 0, 4);
  }
  destroy() {
    yn(this, Sn, null), yn(this, $n, null);
  }
};
Sn = new WeakMap(), $n = new WeakMap(), Bn = new WeakMap(), zn = new WeakMap(), qn = new WeakMap(), Di(Mn, "vertexShaderSource", `
    attribute vec2 xy;

    void main(void) {
      gl_Position = vec4(xy, 0.0, 1.0);
    }
  `), Di(Mn, "fragmentShaderSource", `
  precision mediump float;
  uniform sampler2D tex;
  uniform float texWidth;
  uniform float texHeight;
  const vec3 keyColor = vec3(0.47, 1.0, 0.47);
  uniform float similarity;
  uniform float smoothness;
  uniform float spill;
  vec2 RGBtoUV(vec3 rgb) {
    return vec2(
      rgb.r * -0.169 + rgb.g * -0.331 + rgb.b *  0.5    + 0.5,
      rgb.r *  0.5   + rgb.g * -0.419 + rgb.b * -0.081  + 0.5
    );
  }
  vec4 GetRgba(float detaX, float detaY) {
    vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);
    vec4 rgba = texture2D(tex, texCoord);
    float green = rgba.g - max(rgba.r, rgba.b);
    float greenKey = keyColor.g - max(keyColor.r, keyColor.b);
    float mask = smoothstep(greenKey-0.1, 0.0, green);
    rgba.a = mask;
    return rgba;
  }
  vec4 ProcessChromaKey() {
    vec4 rgba = GetRgba(0.0, 0.0);
    if (rgba.a > 0.0 && rgba.a < 1.0) {
      vec4 rgbas[9];
      float maxMask = 0.0;
      vec4 minRgba = rgba;
      for (int i = -1; i <= 1; i++) {
        for (int j = -1; j <= 1; j++) {
          vec4 tmp;
          if (i == 0 && j == 0) {
            tmp = rgba;
          } else {
            tmp = GetRgba(float(i), float(j));
          }
          rgbas[(i+1)*3 + (j+1)] = tmp;
          if (tmp.a > maxMask) {
            maxMask = tmp.a;
            minRgba = tmp;
          }
        }
      }
      rgbas[4] = minRgba;
      rgbas[4].a = rgba.a;
      vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);

      float gs[9];
      gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
      gs[1] = gs[3] = gs[5] = gs[7] = 0.05;
      gs[4] = 0.6;
      for(int i = 0; i < 9; i++) {
        dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];
      }

      gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
      gs[1] = gs[3] = gs[5] = gs[7] = 0.15;
      gs[4] = 0.2;
      for(int i = 0; i < 9; i++) {
        dest.a = dest.a + rgbas[i].a* gs[i];
      }
      rgba.rgb = dest.rgb;
      rgba.a = dest.a;
      if (rgba.g > rgba.r && rgba.g > rgba.b) {
        rgba.g = max(rgba.r, rgba.b);
      }
      rgba.rgb = rgba.rgb * rgba.a;
    } else {
      rgba.rgb = rgba.rgb * rgba.a;
    }
    return rgba;
  }

  void main(void) {
    gl_FragColor = ProcessChromaKey();
  }
  `);
let WebGLRenderer = Mn;
class Render {
  constructor(t) {
    this.flv = t;
    const { container: n } = t.options;
    this.canvas = n, this.renderer = new WebGLRenderer("", n);
  }
  drawFrame(t) {
    const n = this, r = this.canvas.getAttribute("width"), l = this.canvas.getAttribute("height");
    n.renderer.draw(t, r, l);
  }
  destroy() {
    this.renderer.destroy();
  }
}
var FrameSink = { exports: {} };
(function() {
  function f(t, n) {
    throw new Error("abstract");
  }
  f.prototype.drawFrame = function(t) {
    throw new Error("abstract");
  }, f.prototype.clear = function() {
    throw new Error("abstract");
  }, FrameSink.exports = f;
})();
var FrameSinkExports = FrameSink.exports, YCbCr = { exports: {} }, depower = { exports: {} };
(function() {
  /**
   * Convert a ratio into a bit-shift count; for instance a ratio of 2
   * becomes a bit-shift of 1, while a ratio of 1 is a bit-shift of 0.
   *
   * @author Brion Vibber <brion@pobox.com>
   * @copyright 2016
   * @license MIT-style
   *
   * @param {number} ratio - the integer ratio to convert.
   * @returns {number} - number of bits to shift to multiply/divide by the ratio.
   * @throws exception if given a non-power-of-two
   */
  function f(t) {
    for (var n = 0, r = t >> 1; r != 0; )
      r = r >> 1, n++;
    if (t !== 1 << n)
      throw "chroma plane dimensions must be power of 2 ratio to luma plane dimensions; got " + t;
    return n;
  }
  depower.exports = f;
})();
var depowerExports = depower.exports;
(function() {
  var f = depowerExports;
  /**
   * Basic YCbCr->RGB conversion
   *
   * @author Brion Vibber <brion@pobox.com>
   * @copyright 2014-2019
   * @license MIT-style
   *
   * @param {YUVFrame} buffer - input frame buffer
   * @param {Uint8ClampedArray} output - array to draw RGBA into
   * Assumes that the output array already has alpha channel set to opaque.
   */
  function t(n, r) {
    var l = n.format.width | 0, a = n.format.height | 0, e = f(n.format.width / n.format.chromaWidth) | 0, g = f(n.format.height / n.format.chromaHeight) | 0, _ = n.y.bytes, y = n.u.bytes, x = n.v.bytes, E = n.y.stride | 0, C = n.u.stride | 0, L = n.v.stride | 0, A = l << 2, I = 0, D = 0, w = 0, S = 0, O = 0, F = 0, j = 0, P = 0, $ = 0, V = 0, q = 0, ee = 0, re = 0, ye = 0, ce = 0, Q = 0, se = 0, fe = 0;
    if (e == 1 && g == 1)
      for (j = 0, P = A, fe = 0, Q = 0; Q < a; Q += 2) {
        for (D = Q * E | 0, w = D + E | 0, S = fe * C | 0, O = fe * L | 0, ce = 0; ce < l; ce += 2)
          $ = y[S++] | 0, V = x[O++] | 0, ee = (409 * V | 0) - 57088 | 0, re = (100 * $ | 0) + (208 * V | 0) - 34816 | 0, ye = (516 * $ | 0) - 70912 | 0, q = 298 * _[D++] | 0, r[j] = q + ee >> 8, r[j + 1] = q - re >> 8, r[j + 2] = q + ye >> 8, j += 4, q = 298 * _[D++] | 0, r[j] = q + ee >> 8, r[j + 1] = q - re >> 8, r[j + 2] = q + ye >> 8, j += 4, q = 298 * _[w++] | 0, r[P] = q + ee >> 8, r[P + 1] = q - re >> 8, r[P + 2] = q + ye >> 8, P += 4, q = 298 * _[w++] | 0, r[P] = q + ee >> 8, r[P + 1] = q - re >> 8, r[P + 2] = q + ye >> 8, P += 4;
        j += A, P += A, fe++;
      }
    else
      for (F = 0, Q = 0; Q < a; Q++)
        for (se = 0, fe = Q >> g, I = Q * E | 0, S = fe * C | 0, O = fe * L | 0, ce = 0; ce < l; ce++)
          se = ce >> e, $ = y[S + se] | 0, V = x[O + se] | 0, ee = (409 * V | 0) - 57088 | 0, re = (100 * $ | 0) + (208 * V | 0) - 34816 | 0, ye = (516 * $ | 0) - 70912 | 0, q = 298 * _[I++] | 0, r[F] = q + ee >> 8, r[F + 1] = q - re >> 8, r[F + 2] = q + ye >> 8, F += 4;
  }
  YCbCr.exports = {
    convertYCbCr: t
  };
})();
var YCbCrExports = YCbCr.exports;
(function() {
  var f = FrameSinkExports, t = YCbCrExports;
  function n(r) {
    var l = this, a = r.getContext("2d"), e = null, g = null, _ = null;
    function y(E, C) {
      e = a.createImageData(E, C);
      for (var L = e.data, A = E * C * 4, I = 0; I < A; I += 4)
        L[I + 3] = 255;
    }
    function x(E, C) {
      g = document.createElement("canvas"), g.width = E, g.height = C, _ = g.getContext("2d");
    }
    return l.drawFrame = function(C) {
      var L = C.format;
      (r.width !== L.displayWidth || r.height !== L.displayHeight) && (r.width = L.displayWidth, r.height = L.displayHeight), (e === null || e.width != L.width || e.height != L.height) && y(L.width, L.height), t.convertYCbCr(C, e.data);
      var A = L.cropWidth != L.displayWidth || L.cropHeight != L.displayHeight, I;
      A ? (g || x(L.cropWidth, L.cropHeight), I = _) : I = a, I.putImageData(
        e,
        -L.cropLeft,
        -L.cropTop,
        // must offset the offset
        L.cropLeft,
        L.cropTop,
        L.cropWidth,
        L.cropHeight
      ), A && a.drawImage(g, 0, 0, L.displayWidth, L.displayHeight);
    }, l.clear = function() {
      a.clearRect(0, 0, r.width, r.height);
    }, l;
  }
  n.prototype = Object.create(f.prototype);
})();
var shaders = {
  vertex: `precision mediump float;

attribute vec2 aPosition;
attribute vec2 aLumaPosition;
attribute vec2 aChromaPosition;
varying vec2 vLumaPosition;
varying vec2 vChromaPosition;
void main() {
    gl_Position = vec4(aPosition, 0, 1);
    vLumaPosition = aLumaPosition;
    vChromaPosition = aChromaPosition;
}
`,
  fragment: `// inspired by https://github.com/mbebenita/Broadway/blob/master/Player/canvas.js

precision mediump float;

uniform sampler2D uTextureY;
uniform sampler2D uTextureCb;
uniform sampler2D uTextureCr;
varying vec2 vLumaPosition;
varying vec2 vChromaPosition;
void main() {
   // Y, Cb, and Cr planes are uploaded as ALPHA textures.
   float fY = texture2D(uTextureY, vLumaPosition).w;
   float fCb = texture2D(uTextureCb, vChromaPosition).w;
   float fCr = texture2D(uTextureCr, vChromaPosition).w;

   // Premultipy the Y...
   float fYmul = fY * 1.1643828125;

   // And convert that to RGB!
   gl_FragColor = vec4(
     fYmul + 1.59602734375 * fCr - 0.87078515625,
     fYmul - 0.39176171875 * fCb - 0.81296875 * fCr + 0.52959375,
     fYmul + 2.017234375   * fCb - 1.081390625,
     1
   );
}
`,
  vertexStripe: `precision mediump float;

attribute vec2 aPosition;
attribute vec2 aTexturePosition;
varying vec2 vTexturePosition;

void main() {
    gl_Position = vec4(aPosition, 0, 1);
    vTexturePosition = aTexturePosition;
}
`,
  fragmentStripe: `// extra 'stripe' texture fiddling to work around IE 11's poor performance on gl.LUMINANCE and gl.ALPHA textures

precision mediump float;

uniform sampler2D uStripe;
uniform sampler2D uTexture;
varying vec2 vTexturePosition;
void main() {
   // Y, Cb, and Cr planes are mapped into a pseudo-RGBA texture
   // so we can upload them without expanding the bytes on IE 11
   // which doesn't allow LUMINANCE or ALPHA textures
   // The stripe textures mark which channel to keep for each pixel.
   // Each texture extraction will contain the relevant value in one
   // channel only.

   float fLuminance = dot(
      texture2D(uStripe, vTexturePosition),
      texture2D(uTexture, vTexturePosition)
   );

   gl_FragColor = vec4(0, 0, 0, fLuminance);
}
`
};
(function() {
  var f = FrameSinkExports, t = shaders;
  function n(r) {
    var l = this, a = n.contextForCanvas(r);
    if (a === null)
      throw new Error("WebGL unavailable");
    function e(Q, se) {
      var fe = a.createShader(Q);
      if (a.shaderSource(fe, se), a.compileShader(fe), !a.getShaderParameter(fe, a.COMPILE_STATUS)) {
        var G = a.getShaderInfoLog(fe);
        throw a.deleteShader(fe), new Error("GL shader compilation for " + Q + " failed: " + G);
      }
      return fe;
    }
    var g, _, y = new Float32Array([
      // First triangle (top left, clockwise)
      -1,
      -1,
      1,
      -1,
      -1,
      1,
      // Second triangle (bottom right, clockwise)
      -1,
      1,
      1,
      -1,
      1,
      1
    ]), x = {}, E = {}, C = {}, L, A, I, D, w, S, O, F, j, P;
    function $(Q, se) {
      return (!x[Q] || se) && (x[Q] = a.createTexture()), x[Q];
    }
    function V(Q, se, fe, G, K) {
      var de = !x[Q] || se, ve = $(Q, se);
      if (a.activeTexture(a.TEXTURE0), n.stripe) {
        var ae = !x[Q + "_temp"] || se, J = $(Q + "_temp", se);
        a.bindTexture(a.TEXTURE_2D, J), ae ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.NEAREST), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.NEAREST), a.texImage2D(
          a.TEXTURE_2D,
          0,
          // mip level
          a.RGBA,
          // internal format
          fe / 4,
          G,
          0,
          // border
          a.RGBA,
          // format
          a.UNSIGNED_BYTE,
          // type
          K
          // data!
        )) : a.texSubImage2D(
          a.TEXTURE_2D,
          0,
          // mip level
          0,
          // x offset
          0,
          // y offset
          fe / 4,
          G,
          a.RGBA,
          // format
          a.UNSIGNED_BYTE,
          // type
          K
          // data!
        );
        var U = x[Q + "_stripe"], X = !U || se;
        X && (U = $(Q + "_stripe", se)), a.bindTexture(a.TEXTURE_2D, U), X && (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.NEAREST), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.NEAREST), a.texImage2D(
          a.TEXTURE_2D,
          0,
          // mip level
          a.RGBA,
          // internal format
          fe,
          1,
          0,
          // border
          a.RGBA,
          // format
          a.UNSIGNED_BYTE,
          //type
          re(fe)
          // data!
        ));
      } else
        a.bindTexture(a.TEXTURE_2D, ve), de ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.texImage2D(
          a.TEXTURE_2D,
          0,
          // mip level
          a.ALPHA,
          // internal format
          fe,
          G,
          0,
          // border
          a.ALPHA,
          // format
          a.UNSIGNED_BYTE,
          //type
          K
          // data!
        )) : a.texSubImage2D(
          a.TEXTURE_2D,
          0,
          // mip level
          0,
          // x
          0,
          // y
          fe,
          G,
          a.ALPHA,
          // internal format
          a.UNSIGNED_BYTE,
          //type
          K
          // data!
        );
    }
    function q(Q, se, fe, G) {
      var K = x[Q];
      a.useProgram(_);
      var de = E[Q];
      (!de || se) && (a.activeTexture(a.TEXTURE0), a.bindTexture(a.TEXTURE_2D, K), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.texImage2D(
        a.TEXTURE_2D,
        0,
        // mip level
        a.RGBA,
        // internal format
        fe,
        G,
        0,
        // border
        a.RGBA,
        // format
        a.UNSIGNED_BYTE,
        //type
        null
        // data!
      ), de = E[Q] = a.createFramebuffer()), a.bindFramebuffer(a.FRAMEBUFFER, de), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, K, 0);
      var ve = x[Q + "_temp"];
      a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, ve), a.uniform1i(S, 1);
      var ae = x[Q + "_stripe"];
      a.activeTexture(a.TEXTURE2), a.bindTexture(a.TEXTURE_2D, ae), a.uniform1i(w, 2), a.bindBuffer(a.ARRAY_BUFFER, L), a.enableVertexAttribArray(A), a.vertexAttribPointer(A, 2, a.FLOAT, !1, 0, 0), a.bindBuffer(a.ARRAY_BUFFER, I), a.enableVertexAttribArray(D), a.vertexAttribPointer(D, 2, a.FLOAT, !1, 0, 0), a.viewport(0, 0, fe, G), a.drawArrays(a.TRIANGLES, 0, y.length / 2), a.bindFramebuffer(a.FRAMEBUFFER, null);
    }
    function ee(Q, se, fe) {
      a.activeTexture(se), a.bindTexture(a.TEXTURE_2D, x[Q]), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.uniform1i(a.getUniformLocation(g, Q), fe);
    }
    function re(Q) {
      if (C[Q])
        return C[Q];
      for (var se = Q, fe = new Uint32Array(se), G = 0; G < se; G += 4)
        fe[G] = 255, fe[G + 1] = 65280, fe[G + 2] = 16711680, fe[G + 3] = 4278190080;
      return C[Q] = new Uint8Array(fe.buffer);
    }
    function ye(Q, se) {
      var fe = e(a.VERTEX_SHADER, Q), G = e(a.FRAGMENT_SHADER, se), K = a.createProgram();
      if (a.attachShader(K, fe), a.attachShader(K, G), a.linkProgram(K), !a.getProgramParameter(K, a.LINK_STATUS)) {
        var de = a.getProgramInfoLog(K);
        throw a.deleteProgram(K), new Error("GL program linking failed: " + de);
      }
      return K;
    }
    function ce() {
      if (n.stripe) {
        _ = ye(t.vertexStripe, t.fragmentStripe), a.getAttribLocation(_, "aPosition"), I = a.createBuffer();
        var Q = new Float32Array([
          0,
          0,
          1,
          0,
          0,
          1,
          0,
          1,
          1,
          0,
          1,
          1
        ]);
        a.bindBuffer(a.ARRAY_BUFFER, I), a.bufferData(a.ARRAY_BUFFER, Q, a.STATIC_DRAW), D = a.getAttribLocation(_, "aTexturePosition"), w = a.getUniformLocation(_, "uStripe"), S = a.getUniformLocation(_, "uTexture");
      }
      g = ye(t.vertex, t.fragment), L = a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER, L), a.bufferData(a.ARRAY_BUFFER, y, a.STATIC_DRAW), A = a.getAttribLocation(g, "aPosition"), O = a.createBuffer(), F = a.getAttribLocation(g, "aLumaPosition"), j = a.createBuffer(), P = a.getAttribLocation(g, "aChromaPosition");
    }
    return l.drawFrame = function(Q) {
      var se = Q.format, fe = !g || r.width !== se.displayWidth || r.height !== se.displayHeight;
      if (fe && (r.width = se.displayWidth, r.height = se.displayHeight, l.clear()), g || ce(), fe) {
        var G = function(K, de, ve) {
          var ae = se.cropLeft / ve, J = (se.cropLeft + se.cropWidth) / ve, U = (se.cropTop + se.cropHeight) / se.height, X = se.cropTop / se.height, ne = new Float32Array([
            ae,
            U,
            J,
            U,
            ae,
            X,
            ae,
            X,
            J,
            U,
            J,
            X
          ]);
          a.bindBuffer(a.ARRAY_BUFFER, K), a.bufferData(a.ARRAY_BUFFER, ne, a.STATIC_DRAW);
        };
        G(
          O,
          F,
          Q.y.stride
        ), G(
          j,
          P,
          Q.u.stride * se.width / se.chromaWidth
        );
      }
      V("uTextureY", fe, Q.y.stride, se.height, Q.y.bytes), V("uTextureCb", fe, Q.u.stride, se.chromaHeight, Q.u.bytes), V("uTextureCr", fe, Q.v.stride, se.chromaHeight, Q.v.bytes), n.stripe && (q("uTextureY", fe, Q.y.stride, se.height), q("uTextureCb", fe, Q.u.stride, se.chromaHeight), q("uTextureCr", fe, Q.v.stride, se.chromaHeight)), a.useProgram(g), a.viewport(0, 0, r.width, r.height), ee("uTextureY", a.TEXTURE0, 0), ee("uTextureCb", a.TEXTURE1, 1), ee("uTextureCr", a.TEXTURE2, 2), a.bindBuffer(a.ARRAY_BUFFER, L), a.enableVertexAttribArray(A), a.vertexAttribPointer(A, 2, a.FLOAT, !1, 0, 0), a.bindBuffer(a.ARRAY_BUFFER, O), a.enableVertexAttribArray(F), a.vertexAttribPointer(F, 2, a.FLOAT, !1, 0, 0), a.bindBuffer(a.ARRAY_BUFFER, j), a.enableVertexAttribArray(P), a.vertexAttribPointer(P, 2, a.FLOAT, !1, 0, 0), a.drawArrays(a.TRIANGLES, 0, y.length / 2);
    }, l.clear = function() {
      a.viewport(0, 0, r.width, r.height), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT);
    }, l.clear(), l;
  }
  n.stripe = !1, n.contextForCanvas = function(r) {
    var l = {
      // Don't trigger discrete GPU in multi-GPU systems
      preferLowPowerToHighPerformance: !0,
      powerPreference: "low-power",
      // Don't try to use software GL rendering!
      failIfMajorPerformanceCaveat: !0,
      // In case we need to capture the resulting output.
      preserveDrawingBuffer: !0
    };
    return r.getContext("webgl", l) || r.getContext("experimental-webgl", l);
  }, n.isAvailable = function() {
    var r = document.createElement("canvas"), l;
    r.width = 1, r.height = 1;
    try {
      l = n.contextForCanvas(r);
    } catch {
      return !1;
    }
    if (l) {
      var a = l.TEXTURE0, e = 4, g = 4, _ = l.createTexture(), y = new Uint8Array(e * g), x = n.stripe ? e / 4 : e, E = n.stripe ? l.RGBA : l.ALPHA, C = n.stripe ? l.NEAREST : l.LINEAR;
      l.activeTexture(a), l.bindTexture(l.TEXTURE_2D, _), l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE), l.texParameteri(l.TEXTURE_2D, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE), l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MIN_FILTER, C), l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MAG_FILTER, C), l.texImage2D(
        l.TEXTURE_2D,
        0,
        // mip level
        E,
        // internal format
        x,
        g,
        0,
        // border
        E,
        // format
        l.UNSIGNED_BYTE,
        //type
        y
        // data!
      );
      var L = l.getError();
      return !L;
    } else
      return !1;
  }, n.prototype = Object.create(f.prototype);
})();
function Texture(f) {
  this.gl = f, this.texture = f.createTexture(), f.bindTexture(f.TEXTURE_2D, this.texture), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MAG_FILTER, f.LINEAR), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_MIN_FILTER, f.LINEAR), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_S, f.CLAMP_TO_EDGE), f.texParameteri(f.TEXTURE_2D, f.TEXTURE_WRAP_T, f.CLAMP_TO_EDGE);
}
Texture.prototype.bind = function(f, t, n) {
  let r = this.gl;
  r.activeTexture([r.TEXTURE0, r.TEXTURE1, r.TEXTURE2][f]), r.bindTexture(r.TEXTURE_2D, this.texture), r.uniform1i(r.getUniformLocation(t, n), f);
};
Texture.prototype.fill = function(f, t, n) {
  let r = this.gl;
  r.bindTexture(r.TEXTURE_2D, this.texture), r.texImage2D(r.TEXTURE_2D, 0, r.LUMINANCE, f, t, 0, r.LUMINANCE, r.UNSIGNED_BYTE, n);
};
class Renderer {
  constructor(t) {
    this.flv = t;
    const { container: n } = t.options;
    this.canvas = n, this.gl = n.getContext("webgl2") || n.getContext("webgl") || n.getContext("experimental-webgl"), this.initGL({
      preserveDrawingBuffer: !1
    });
  }
  initGL(t) {
    if (!this.gl) {
      console.log("[ER] WebGL not supported.");
      return;
    }
    let n = this.gl;
    n.pixelStorei(n.UNPACK_ALIGNMENT, 1);
    let r = n.createProgram(), l = `
        attribute highp vec4 aVertexPosition;
        attribute vec2 aTextureCoord;
        varying highp vec2 vTextureCoord;
        void main(void) {
          gl_Position = aVertexPosition;
          vTextureCoord = aTextureCoord;
        }`, a = n.createShader(n.VERTEX_SHADER);
    n.shaderSource(a, l), n.compileShader(a);
    let e = `

        precision mediump float;
        uniform sampler2D tex;
        uniform sampler2D YTexture;
        uniform sampler2D UTexture;
        uniform sampler2D VTexture;
        uniform float texWidth;
        uniform float texHeight;
        const vec3 keyColor = vec3(0.47, 1.0, 0.47);
        uniform float similarity;
        uniform float smoothness;
        uniform float spill;
        vec2 RGBtoUV(vec3 rgb) {
          return vec2(
            rgb.r * -0.169 + rgb.g * -0.331 + rgb.b *  0.5    + 0.5,
            rgb.r *  0.5   + rgb.g * -0.419 + rgb.b * -0.081  + 0.5
          );
        }
        const mat4 YUV2RGB = mat4
        (
         1.1643828125, 0, 1.59602734375, -.87078515625,
         1.1643828125, -.39176171875, -.81296875, .52959375,
         1.1643828125, 2.017234375, 0, -1.081390625,
         0, 0, 0, 1
        );
        vec4 GetRgba(float detaX, float detaY) {
          vec2 texCoord = vec2((gl_FragCoord.x + detaX)/texWidth, 1.0 - (gl_FragCoord.y + detaY)/texHeight);
          vec4 rgba = vec4( texture2D(YTexture, texCoord).x, texture2D(UTexture, texCoord).x, texture2D(VTexture, texCoord).x, 1) * YUV2RGB;
          float green = rgba.g - max(rgba.r, rgba.b);
          float greenKey = keyColor.g - max(keyColor.r, keyColor.b);
          float mask = smoothstep(greenKey-0.1, 0.0, green);
          rgba.a = mask;
          return rgba;
        }
        vec4 ProcessChromaKey() {
          vec4 rgba = GetRgba(0.0, 0.0);
          if (rgba.a > 0.0 && rgba.a < 1.0) {
            vec4 rgbas[9];
            float maxMask = 0.0;
            vec4 minRgba = rgba;
            for (int i = -1; i <= 1; i++) {
              for (int j = -1; j <= 1; j++) {
                vec4 tmp;
                if (i == 0 && j == 0) {
                  tmp = rgba;
                } else {
                  tmp = GetRgba(float(i), float(j));
                }
                rgbas[(i+1)*3 + (j+1)] = tmp;
                if (tmp.a > maxMask) {
                  maxMask = tmp.a;
                  minRgba = tmp;
                }
              }
            }
            rgbas[4] = minRgba;
            rgbas[4].a = rgba.a;
            vec4 dest = vec4(0.0, 0.0, 0.0, 0.0);

            float gs[9];
            gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
            gs[1] = gs[3] = gs[5] = gs[7] = 0.05;
            gs[4] = 0.6;
            for(int i = 0; i < 9; i++) {
              dest.rgb = dest.rgb + rgbas[i].rgb * gs[i];
            }

            gs[0] = gs[2] = gs[6] = gs[8] = 0.05;
            gs[1] = gs[3] = gs[5] = gs[7] = 0.15;
            gs[4] = 0.2;
            for(int i = 0; i < 9; i++) {
              dest.a = dest.a + rgbas[i].a* gs[i];
            }
            rgba.rgb = dest.rgb;
            rgba.a = dest.a;
            if (rgba.g > rgba.r && rgba.g > rgba.b) {
              rgba.g = max(rgba.r, rgba.b);
            }
            rgba.rgb = rgba.rgb * rgba.a;
          } else {
            rgba.rgb = rgba.rgb * rgba.a;
          }
          return rgba;
        }

        void main(void) {
          gl_FragColor = ProcessChromaKey();
        }
        `, g = n.createShader(n.FRAGMENT_SHADER);
    n.shaderSource(g, e), n.compileShader(g), n.attachShader(r, a), n.attachShader(r, g), n.linkProgram(r), n.useProgram(r), n.getProgramParameter(r, n.LINK_STATUS) || console.log("[ER] Shader link failed.");
    let _ = n.getAttribLocation(r, "aVertexPosition");
    n.enableVertexAttribArray(_);
    let y = n.getAttribLocation(r, "aTextureCoord");
    n.enableVertexAttribArray(y);
    let x = n.createBuffer();
    n.bindBuffer(n.ARRAY_BUFFER, x), n.bufferData(n.ARRAY_BUFFER, new Float32Array([1, 1, 0, -1, 1, 0, 1, -1, 0, -1, -1, 0]), n.STATIC_DRAW), n.vertexAttribPointer(_, 3, n.FLOAT, !1, 0, 0);
    let E = n.createBuffer();
    n.bindBuffer(n.ARRAY_BUFFER, E), n.bufferData(n.ARRAY_BUFFER, new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), n.STATIC_DRAW), n.vertexAttribPointer(y, 2, n.FLOAT, !1, 0, 0), n.y = new Texture(n), n.u = new Texture(n), n.v = new Texture(n), n.y.bind(0, r, "YTexture"), n.u.bind(1, r, "UTexture"), n.v.bind(2, r, "VTexture");
    let C = n.getUniformLocation(r, "texWidth"), L = n.getUniformLocation(r, "texHeight");
    n.uniform1f(C, this.canvas.width), n.uniform1f(L, this.canvas.height);
  }
  drawFrame(t) {
    if (!this.gl) {
      console.log("[ER] Render frame failed due to WebGL not supported.");
      return;
    }
    const { data: n, width: r, height: l, yLength: a, uvLength: e } = t, g = new Uint8Array(n), _ = this.gl;
    _.viewport(0, 0, _.canvas.width, _.canvas.height), _.clearColor(0, 0, 0, 0), _.clear(_.COLOR_BUFFER_BIT), _.y.fill(r, l, g.subarray(0, a)), _.u.fill(r >> 1, l >> 1, g.subarray(a, a + e)), _.v.fill(r >> 1, l >> 1, g.subarray(a + e, g.length)), _.drawArrays(_.TRIANGLE_STRIP, 0, 4);
  }
  fullscreen() {
    let t = this.canvas;
    t.RequestFullScreen ? t.RequestFullScreen() : t.webkitRequestFullScreen ? t.webkitRequestFullScreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.msRequestFullscreen ? t.msRequestFullscreen() : alert("This browser doesn't supporter fullscreen");
  }
  exitfullscreen() {
    document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen ? document.msExitFullscreen() : alert("Exit fullscreen doesn't work");
  }
  destroy() {
    this.flv = null, this.canvas = null, this.gl = null;
  }
}
let Decoder$1 = class {
  constructor(t) {
    return window.VideoDecoder ? new Render(t, this) : new Renderer(t, this);
  }
};
class VideoBasic {
  constructor(t) {
    const { flv: n } = t;
    this.flv = n, this.playing = !1, this.inputVideoIndex = 0, this.outVideoIndex = 0, this.videoFrames = [], this.lastTime = 0;
    const r = this;
    n.on("destroy", () => {
      r.playing = !1, r.videoFrames = null;
    }), n.on("timeupdate", (l) => {
      var a;
      ((a = r.videoFrames[0]) == null ? void 0 : a.pts) <= l + 20 && (parseInt(performance.now()), this.lastTime = parseInt(performance.now()), r.draw(0));
    });
  }
  get decoding() {
    return this.outVideoIndex !== this.inputVideoIndex;
  }
  framePlay() {
    return !!((this.lastTime > 0 && this.videoFrames.length > 0 || this.videoFrames.length > 10) && this.playing);
  }
  reset() {
    this.playing = !1, this.workerReset(), window.VideoDecoder && this.videoFrames.forEach((t) => {
      var n;
      (n = t.data) == null || n.close();
    }), this.videoFrames = [], this.inputVideoIndex = 0, this.outVideoIndex = 0, this.lastTime = 0;
  }
  clearList() {
    console.log("---clearList---"), window.VideoDecoder && this.videoFrames.forEach((t) => {
      var n;
      (n = t.data) == null || n.close();
    }), this.videoFrames = [], this.inputVideoIndex = 0, this.outVideoIndex = 0, this.lastTime = 0;
  }
  draw(t) {
    const n = this.videoFrames[t];
    if (!n)
      return !1;
    if (this.videoFrames.shift(), window.VideoDecoder) {
      n.type != "videoEnd" ? this.flv.render.drawFrame(n.data) : (this.flv.playAudioLastFrame(), this.flv.options.wxServerEnd());
      return;
    }
    n.type != "videoEnd" ? this.flv.render.drawFrame(n) : (this.flv.playAudioLastFrame(), this.flv.options.wxServerEnd());
  }
  play() {
    this.videoFrames.length > 0 ? this.playing = !0 : this.playing = !1;
  }
  stop() {
    this.playing = !1;
  }
}
class Wasm extends VideoBasic {
  constructor(t) {
    super(t);
    const { flv: n } = t;
    this.flv = n, this.firstTarget = !1, this.animationFrameTimer = null, this.list = [], this.loop = !1, this.workerInit(), this.animationFrame(), n.on("videoData", (r, l) => {
      this.list.push({ buffer: r, timestamp: l });
    }), n.on("destroy", () => {
      this.animationFrameTimer && cancelAnimationFrame(this.animationFrameTimer), this.animationFrameTimer = null, this.decoderWorker.postMessage({ type: "stop" }), this.decoderWorker.terminate(), this.decoderWorker = null;
    });
  }
  workerInit() {
    const t = this;
    this.decoderWorker = new Worker("ffmpegWorker.js"), this.decoderWorker.onmessage = (n) => {
      const r = n.data;
      switch (r.type) {
        case "video":
          this.outVideoIndex++, this.videoFrames.push(r);
          break;
        case "videoEnd":
          this.outVideoIndex++, this.videoFrames.push(r);
          break;
        case "loaded":
          this.firstTarget ? (console.log("重启wasm"), setTimeout(() => {
            t.loop = !0;
          }, 100)) : (this.firstTarget = !0, this.flv.emit("workOn"), setTimeout(() => {
            t.loop = !0;
          }, 100));
          break;
      }
    };
  }
  workerReset() {
    this.loop = !1, this.list = [], console.log("wasm restart"), this.decoderWorker.postMessage({ type: "stop" }), this.decoderWorker.terminate(), this.workerInit();
  }
  animationFrame() {
    const t = this;
    this.animationFrameTimer = requestAnimationFrame(() => {
      if (t.list[0] && t.loop) {
        const r = t.list.shift();
        t.inputVideoIndex++, t.decoderWorker.postMessage({ data: r.buffer, pts: r.timestamp }, [r.buffer.buffer]);
      }
      this.animationFrame();
    });
  }
}
const webCodecsText = `let renderer = null;
let pendingFrame = null;
let startTime = null;
let frameCount = 0;
let width = 1080;
let height = 1920;
let videoDecoder = null;
let h264Arr = [];
let decoding = false;
let playing = false;
let animationFrameTimer = null;
let fpsTime = 0;
let fpsCount = 0;
let missCount = 0;
function animationFrame() {
  animationFrameTimer = requestAnimationFrame(() => {
    const h264Len = h264Arr.length;
    if (h264Len > 0 && decoding == false && playing) {
      let nowTime = getNowTime();
      if (fpsTime == 0 || fpsTime < nowTime - 1000) {
        if (fpsTime == 0) {
          console.info(nowTime, "start decode");
          missCount = 10;
        } else {
          if (fpsCount < 25) {
            missCount += 25 - fpsCount;
          } else {
            missCount = missCount - (fpsCount - 25);
          }
          console.info(fpsTime, "decode fps", fpsCount, ", miss", missCount);
        }
        fpsTime = nowTime;
        fpsCount = 0;
      }
      if (fpsCount < 25 + missCount) {
        try {
          const buffer = h264Arr.shift();
          // console.log(h264Arr.length, buffer, h264Arr[0])
          if (h264Len <= 2 && h264Arr[0]?.byteLength == 1) {
            self.postMessage({
              type: "videoEnd",
              pts: buffer.timestamp,
            });
            h264Arr = [];
          } else if (buffer.byteLength != 1) {
            // console.log("解码")
            decoding = true;
            videoDecoder.decode(buffer);
            fpsCount = fpsCount + 1;
          }
        } catch (e) {
          console.info(e);
          decoding = false;
        }
      }
    }
    animationFrame();
  });
}

// Startup.
function webCodes() {
  videoDecoder = new VideoDecoder({
    output: (videoFrame) => {
      if (!playing) return;
      self.postMessage(
        {
          type: "video",
          data: videoFrame,
          pts: videoFrame.timestamp,
        },
        [videoFrame]
      );
      decoding = false;
    },
    error: (error) => {
      console.error(error);
    },
  });
  videoDecoder.configure({
    codec: "avc1.64001E",
    codecWidth: width, //解码数据宽度
    codecHeight: height, //解码数据高度
    hardwareAcceleration: "prefer-hardware",
  });
  animationFrame();
  playing = true;
  decoding = false;
  fpsTime = 0;
}
function start() {
  webCodes();
  console.log("webcodes success");
  self.postMessage({
    type: "loaded",
  });
}
function reStart() {
  webCodes();
  console.log("reStart webcodes");
}
function getNowTime() {
  if (performance && typeof performance.now === "function") {
    return parseInt(performance.now());
  }
  return Date.now();
}

self.addEventListener(
  "message",
  function (e) {
    var data = e.data;
    switch (data.type) {
      case "start":
        width = data.width;
        height = data.height;
        start();
        break;
      case "reStart":
        playing = false;
        cancelAnimationFrame(animationFrameTimer);
        videoDecoder.flush();
        h264Arr = [];
        missCount = 10;
        reStart();
        break;
      case "destroy":
        playing = false;
        videoDecoder.flush();
        cancelAnimationFrame(animationFrameTimer);
        self.close(); // Terminates the worker.
        break;
      default:
        if (playing) {
          const chunk = new EncodedVideoChunk({
            timestamp: data.timestamp, //视频帧的时间戳
            type: true ? "key" : "delta", //是否是关键帧
            data: data.buffer, //视频数据
          });
          h264Arr.push(chunk);
        }
    }
  },
  false
);
`;
class WebCode extends VideoBasic {
  constructor(t) {
    super(t);
    const { flv: n } = t, { container: r } = n.options;
    this.canvas = r, this.worker = createWorker(webCodecsText), this.worker.onmessage = (a) => {
      const e = a.data;
      switch (e.type) {
        case "video":
          this.outVideoIndex++, this.videoFrames.push(e);
          break;
        case "videoEnd":
          this.outVideoIndex++, this.videoFrames.push(e);
          break;
        case "loaded":
          n.emit("workOn");
          break;
      }
    }, this.worker.postMessage({ type: "start" });
    const l = this;
    n.on("destroy", () => {
      l.worker.postMessage({ type: "destroy" }), l.worker.terminate(), l.worker = null;
    }), n.on("videoData", (a, e) => {
      this.inputVideoIndex++, l.worker.postMessage({ buffer: a, timestamp: e }, [a.buffer]);
    });
  }
  workerReset() {
    console.log("webcodes restart"), this.worker.postMessage({ type: "reStart" });
  }
}
class Decoder {
  constructor(t) {
    return window.VideoDecoder ? (console.info("Webcodec decode"), new WebCode(t)) : (console.info("wasm decode"), new Wasm(t));
  }
}
var dist = { exports: {} };
(function(f, t) {
  (function(n, r) {
    f.exports = r();
  })(commonjsGlobal, function() {
    class n {
      constructor(l) {
        this.init(l);
      }
      init(l) {
        const a = {
          inputCodec: "Int16",
          // 传入的数据是采用多少位编码，默认16位
          channels: 1,
          // 声道数
          sampleRate: 8e3,
          // 采样率 单位Hz
          flushTime: 1e3
          // 缓存时间 单位 ms
        };
        this.option = Object.assign({}, a, l), this.samples = new Float32Array(), this.interval = setInterval(this.flush.bind(this), this.option.flushTime), this.convertValue = this.getConvertValue(), this.typedArray = this.getTypedArray(), this.initAudioContext(), this.bindAudioContextEvent();
      }
      getConvertValue() {
        const l = {
          Int8: 128,
          Int16: 32768,
          Int32: 2147483648,
          Float32: 1
        };
        if (!l[this.option.inputCodec])
          throw new Error("wrong codec.please input one of these codecs:Int8,Int16,Int32,Float32");
        return l[this.option.inputCodec];
      }
      getTypedArray() {
        const l = {
          Int8: Int8Array,
          Int16: Int16Array,
          Int32: Int32Array,
          Float32: Float32Array
        };
        if (!l[this.option.inputCodec])
          throw new Error("wrong codec.please input one of these codecs:Int8,Int16,Int32,Float32");
        return l[this.option.inputCodec];
      }
      initAudioContext() {
        this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(), this.gainNode = this.audioCtx.createGain(), this.gainNode.gain.value = 0.1, this.gainNode.connect(this.audioCtx.destination), this.startTime = this.audioCtx.currentTime;
      }
      static isTypedArray(l) {
        return l.byteLength && l.buffer && l.buffer.constructor == ArrayBuffer || l.constructor == ArrayBuffer;
      }
      isSupported(l) {
        if (!n.isTypedArray(l))
          throw new Error("请传入ArrayBuffer或者任意TypedArray");
        return !0;
      }
      feed(l) {
        this.isSupported(l), l = this.getFormattedValue(l);
        const a = new Float32Array(this.samples.length + l.length);
        a.set(this.samples, 0), a.set(l, this.samples.length), this.samples = a;
      }
      getFormattedValue(l) {
        l.constructor == ArrayBuffer ? l = new this.typedArray(l) : l = new this.typedArray(l.buffer);
        let a = new Float32Array(l.length);
        for (let e = 0; e < l.length; e++)
          a[e] = l[e] / this.convertValue;
        return a;
      }
      volume(l) {
        this.gainNode.gain.value = l;
      }
      destroy() {
        this.interval && clearInterval(this.interval), this.samples = null, this.audioCtx.close(), this.audioCtx = null;
      }
      flush() {
        if (!this.samples.length)
          return;
        const l = this;
        var a = this.audioCtx.createBufferSource();
        typeof this.option.onended == "function" && (a.onended = function(_) {
          l.option.onended(this, _);
        });
        const e = this.samples.length / this.option.channels, g = this.audioCtx.createBuffer(this.option.channels, e, this.option.sampleRate);
        for (let _ = 0; _ < this.option.channels; _++) {
          const y = g.getChannelData(_);
          let x = _, E = 50;
          for (let C = 0; C < e; C++)
            y[C] = this.samples[x], C < 50 && (y[C] = y[C] * C / 50), C >= e - 51 && (y[C] = y[C] * E-- / 50), x += this.option.channels;
        }
        this.startTime < this.audioCtx.currentTime && (this.startTime = this.audioCtx.currentTime), a.buffer = g, a.connect(this.gainNode), a.start(this.startTime), this.startTime += g.duration, this.samples = new Float32Array();
      }
      async pause() {
        await this.audioCtx.suspend();
      }
      async continue() {
        await this.audioCtx.resume();
      }
      bindAudioContextEvent() {
        const l = this;
        typeof l.option.onstatechange == "function" && (this.audioCtx.onstatechange = function(a) {
          l.audioCtx && l.option.onstatechange(this, a, l.audioCtx.state);
        });
      }
    }
    return n;
  });
})(dist);
var distExports = dist.exports;
const PCMPlayer$1 = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
let AudioPlayer$1 = class {
  constructor(t) {
    const { flv: n } = t;
    this.playing = !1, this.paused = !1, this.audioPts = [], this.outAudioIndex = 0, this.inputAudioIndex = 0, this.volume = 1, this.audioCtrl = new PCMPlayer$1({
      inputCodec: "Int16",
      channels: 1,
      sampleRate: 16e3,
      flushTime: 240,
      endCallback: () => {
        this.playing = !1;
      }
    }), this.audioCtrl.volume(this.volume), n.on("audioData", (r, l) => {
      this.audioPts.push({
        pts: l,
        buffer: r
      });
    }), n.on("destroy", () => {
      this.audioPts = null, this.audioCtrl.destroy(), this.audioCtrl = null;
    }), n.on("timeupdate", (r) => {
      this.resume();
      let l = 10;
      for (let a = 0; a < l; a++)
        this.feed(0);
    });
  }
  get decoding() {
    return this.outAudioIndex !== this.inputAudioIndex;
  }
  get framePlay() {
    return this.audioPts.length > 0 && this.playing;
  }
  get getTimestamp() {
    var t;
    return (t = this.audioCtrl) == null ? void 0 : t.getTimestamp();
  }
  feed(t) {
    const n = this.audioPts[t];
    if (!n)
      return !1;
    this.audioCtrl.feed(n.buffer), this.audioPts.shift();
  }
  play() {
    this.audioPts.length > 0 ? this.playing = !0 : this.playing = !1;
  }
  reset() {
    this.playing = !1, this.audioCtrl.destroy(), this.audioCtrl = new PCMPlayer$1({
      inputCodec: "Int16",
      channels: 1,
      sampleRate: 16e3,
      flushTime: 240,
      endCallback: () => {
        this.playing = !1;
      }
    }), this.audioCtrl.volume(this.volume), this.audioPts = [], this.outAudioIndex = 0, this.inputAudioIndex = 0;
  }
  clearList() {
    this.audioPts = [], this.outAudioIndex = 0, this.inputAudioIndex = 0;
  }
  stop() {
    this.playing = !1, this.audioCtrl.pause();
  }
  pause() {
    this.paused == !1 && (console.log("audio pause......."), this.paused = !0, this.audioCtrl.pause());
  }
  resume() {
    this.paused == !0 && (console.log("audio resume......."), this.paused = !1, this.audioCtrl.continue());
  }
  playLastFrame() {
    console.log("playLastFrame", this.audioPts.length), this.audioPts.length > 0 && (this.audioPts.some((t) => {
      this.audioCtrl.feed(t.buffer);
    }), this.audioPts = []);
  }
}, Play$1 = class {
  constructor(t) {
    this.flv = t, this.streaming = !1, this.ended = !0, this.animationFrameTimer = null, this.decoder = new Decoder(this), this.audioDecoder = new AudioPlayer$1(this), this.sign = 0, this.resultSign = 0, this.playerStatus = "", this.currentTime = 0, this.lastUpdateTime = 0, t.on("destroy", () => {
      this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.animationFrameTimer && cancelAnimationFrame(this.animationFrameTimer), this.animationFrameTimer = null, this.ended = !0;
    }), t.on("streaming", () => {
      this.streaming = !0;
    }), t.on("streamEnd", () => {
      this.streaming = !1, this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null;
    });
  }
  init() {
    this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.currentTime = 0, this.lastUpdateTime = 0, this.animationFrame(), this.ended = !1;
  }
  animationFrame() {
    this.animationFrameTimer = requestAnimationFrame(() => {
      if (this.decoder.framePlay()) {
        const t = parseInt(getNowTime$1());
        this.flv.stearmPtsH || (this.flv.stearmPtsH = !0, this.currentTime = 0, this.lastUpdateTime = t), this.currentTime += t - this.lastUpdateTime, this.lastUpdateTime = t, this.flv.emit("timeupdate", this.currentTime), this.playerStatus != "canplay" && (this.playerStatus = "canplay", this.flv.options.canPlay());
      } else if (this.streaming || this.decoder.decoding || this.audioDecoder.decoding) {
        this.audioDecoder.pause(), this.waitingTimer = setTimeout(() => {
          !this.decoder.framePlay() && !this.audioDecoder.framePlay && this.playerStatus != "waiting" && (this.playerStatus = "waiting", this.flv.options.waiting()), this.lastUpdateTime = getNowTime$1(), this.play();
        }, 300);
        return;
      }
      this.animationFrame();
    });
  }
  play() {
    this.decoder.play(), this.audioDecoder.play(), this.animationFrame();
  }
  restart() {
    this.decoder.reset(), this.audioDecoder.reset(), this.currentTime = 0, this.lastUpdateTime = 0, this.playerStatus = "";
  }
  clearList() {
    this.decoder.clearList(), this.audioDecoder.clearList();
  }
  continue() {
    this.animationFrameTimer || (this.playerStatus = "canplay", this.lastUpdateTime = getNowTime$1(), this.animationFrame(), this.audioDecoder.resume(), this.flv.options.canPlay());
  }
  stop() {
    this.playerStatus = "waiting", this.flv.options.waiting(), this.audioDecoder.pause(), this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.animationFrameTimer && cancelAnimationFrame(this.animationFrameTimer), this.animationFrameTimer = null;
  }
}, flvStearmLoad$1 = class extends Emitter$1 {
  constructor(t) {
    super(), this.options = Object.assign({
      url: "",
      ...t
    }), this.timestamp = 0, this.audioTimestamp = 0, this.init(), this.stearmPtsH = !1;
  }
  init() {
    this.options.webcodeDisabled && (window.VideoDecoder = !1), this.render = new Decoder$1(this), this.player = new Play$1(this), this.on("workOn", () => {
      this.stearmInit(), this.player.init();
    }), this.timestamp = 0, this.audioTimestamp = 0;
  }
  stearmInit() {
    const t = this;
    this.socket = new WebSocket(this.options.url), this.socket.binaryType = "arraybuffer", this.socket.onopen = () => {
      t.options.cbOpen(t.socket), t.emit("streamStart");
    }, this.socket.onmessage = (n) => {
      t.options.cbMessage(t.socket, n, function(r, l) {
        if (l) {
          t.clearList();
          return;
        }
        t.emit("streaming"), r[0] === 80 && r[1] === 67 && r[2] === 77 ? (t.audioTimestamp += 40, t.emit("audioData", r.slice(3), t.audioTimestamp)) : (t.timestamp += 40, t.emit("videoData", r, t.timestamp));
      });
    }, this.socket.onerror = (n) => {
      throw t.options.cbError(t.socket, n), t.emit("streamError", n), n;
    }, this.socket.onclose = () => {
      this.stearmPtsH = !1, t.options.cbClose(t.socket), t.emit("streamEnd");
    }, console.log(this.options.url);
  }
  destroy() {
    this.emit("destroy"), this.socket && (this.socket.close(), this.socket = null), this.render.destroy(), this.render = null;
  }
  restart() {
    console.error("restart stream"), this.timestamp = 80, this.audioTimestamp = 0, this.stearmPtsH = !1, this.player.restart();
  }
  clearList() {
    this.player.clearList();
  }
  changeVolume(t) {
    console.log(this.player.audioDecoder), t ? (this.player.audioDecoder.volume = 0, this.player.audioDecoder.audioCtrl.volume(0)) : (this.player.audioDecoder.volume = 1, this.player.audioDecoder.audioCtrl.volume(1));
  }
  playAudioLastFrame() {
    this.player.audioDecoder.playLastFrame();
  }
};
const isPlat$2 = judgeEnvironment().includes("Chrome");
let ffmPlayer = null, pacemaker$2 = !1, websocket$2 = null, videoPlayerInit$1 = !1, interval$2 = 5, ffmcanvas = null, c2 = null, silentVideo$1 = null, videoWidth$2 = "", videoHeight$2 = "", reqRes$2 = null, playStatus = !1, serverEnded = !1, videoFlow = "", emitter$2 = new Emitter$2();
const checkVideoStatus = debounce(() => {
  console.log(
    "checkVideoStatus"
  ), playStatus && videoFlow == "waiting" && serverEnded && (serverEnded = !1, emitter$2.emit("videoEnd"), websocket$2 == null || websocket$2.send(SendMsg.startAsr()));
}, 280), checkCondition$2 = (f) => {
  "WebSocket" in window ? f(!0, "success") : f(!1, "当前浏览器不支持websocketio连接");
}, webReconnect$1 = (f = !1) => {
  slientShowTarget(!0), ffmPlayer.restart(), videoPlayerInit$1 = !0;
}, loopConnect$2 = () => {
  uninstallEvent$2(!1), startPlayer$2();
}, pageAcitveStatusGet$2 = () => {
  (() => {
    setTimeout(() => {
      interval$2 += 5, interval$2 > 30 && (interval$2 = 30), loopConnect$2();
    }, interval$2 * 1e3);
  })();
}, uninstallEvent$2 = (f = !0) => {
  pacemaker$2 = f, videoPlayerInit$1 = !1, heartPing.end(), ffmPlayer && (ffmPlayer.destroy(), ffmPlayer = null);
};
let asrWsApp$2 = null;
const startPlayer$2 = () => {
  let { _sign: f, _projectId: t, _drivertype: n, _volume: r, _asr: l, decodeType: a } = commonObj;
  ffmPlayer = new flvStearmLoad$1({
    url: websocketInit$1({ _projectId: t, _sign: f, isPlat: isPlat$2, type: 0, _drivertype: n, requestVideo: requestVideo$2 }),
    width: videoWidth$2,
    height: videoHeight$2,
    container: ffmcanvas,
    webcodeDisabled: a == 2,
    cbOpen: function(e) {
      console.log("建立websocket", e), websocket$2 = e, l && asrWsApp$2 && asrWsApp$2(e), heartPing.start(() => {
        (websocket$2 == null ? void 0 : websocket$2.readyState) == 1 && (websocket$2 == null || websocket$2.send(JSON.stringify({ signal: "ping" })));
      });
    },
    cbMessage: isPlat$2 ? function(e, g, _) {
      if (typeof g.data == "object") {
        const y = new Uint8Array(g.data);
        if (!(y[0] !== 72 || y[1] !== 80 || y[2] !== 67 || y[3] !== 77)) {
          videoPlayerInit$1 = !1, console.log("——————————loop new——————————————"), _(null, !0);
          return;
        }
        videoPlayerInit$1 || _(y, videoPlayerInit$1);
      } else if (g.data != "ppg-end") {
        if (g.data.includes("requests overload"))
          pacemaker$2 = !0, emitter$2.emit("wsMessage", {
            type: "requests overload"
          });
        else if (g.data.includes("{")) {
          const y = JSON.parse(g.data);
          y.type == "asr-part" || y.type == "asr" || y.type == "answer" ? emitter$2.emit("wsMessage", y) : y.type == "startAsr" || y.type == "startSleep" || y.type == "wakeup" || (y.type == "server_ready" ? emitter$2.emit("wsMessage", y) : y.type == "server_ended" || (y.type == "error" ? (emitter$2.emit("wsMessage", y), console.error(y.content)) : y.type == "node"));
        }
      }
    } : function(e, g, _) {
      const y = new Uint8Array(g.data);
      if (y[0] === 116 && y[1] === 101 && y[2] === 120 && y[3] === 116) {
        const x = get_text$1(y);
        if (x != "ppg-end") {
          if (x != "pong") {
            if (x.includes("requests overload"))
              pacemaker$2 = !0, emitter$2.emit("wsMessage", {
                type: "requests overload"
              });
            else if (x.includes("{")) {
              const E = JSON.parse(x);
              E.type == "asr-part" || E.type == "asr" || E.type == "answer" ? emitter$2.emit("wsMessage", E) : E.type == "startAsr" || E.type == "startSleep" || E.type == "wakeup" || (E.type == "server_ready" ? emitter$2.emit("wsMessage", E) : E.type == "server_ended" || (E.type == "error" ? (emitter$2.emit("wsMessage", E), console.error(E.content)) : E.type == "node"));
            }
          }
        }
      } else {
        if (!(y[0] !== 72 || y[1] !== 80 || y[2] !== 67 || y[3] !== 77)) {
          videoPlayerInit$1 = !1, console.log("——————————loop new——————————————"), _(null, !0);
          return;
        }
        videoPlayerInit$1 || _(y, videoPlayerInit$1);
      }
    },
    cbError: function(e, g) {
      console.error("websocket错误：", g), emitter$2.emit("wsMessage", {
        type: "websocket Error",
        value: g
      });
    },
    cbClose: function(e) {
      console.error("websocket关闭！"), pacemaker$2 ? emitter$2.emit("wsMessage", {
        type: "websocket close"
      }) : (pageAcitveStatusGet$2(), emitter$2.emit("wsMessage", {
        type: "websocket reLoop"
      }));
    },
    cbDestroy: function(e) {
      console.error("websocket销毁！");
    },
    wxServerEnd: function() {
      console.log("-----wxServerEnd"), playStatus = !0, serverEnded = !0, checkVideoStatus();
    },
    canPlay: function() {
      console.log("-----canPlay"), slientShowTarget(!1), webglCut.videoPlay(), videoFlow = "canplay", emitter$2.emit("videoStart");
    },
    waiting: function() {
      console.log("-----waiting"), slientShowTarget(!0), webglCut.slicePlay(), videoFlow = "waiting", checkVideoStatus();
    }
  });
};
function displayEle$1(f, t) {
  f.style.display = t;
}
const slientShowTarget = debounce((f) => {
  f ? (displayEle$1(ffmcanvas, "none"), displayEle$1(c2, "inline")) : (displayEle$1(ffmcanvas, "inline"), displayEle$1(c2, "none"));
}, 120);
let requestVideo$2 = "";
function player$2(f, t, n, r, l = 1) {
  videoWidth$2 = viewMap[t][r].width, videoHeight$2 = viewMap[t][r].height, requestVideo$2 = `requestWidth=${videoWidth$2}&requestHeight=${videoHeight$2}`, document.querySelector(f).innerHTML = `
      <canvas id="ffmcanvas" style="zoom:${l};" width="${videoWidth$2}" height="${videoHeight$2}"></canvas>
      <canvas id="digitalPlayer" style="zoom:${l};" width="${videoWidth$2}" height="${videoHeight$2}"></canvas>
      <video id="silentVideo" width="${videoWidth$2}" height="${videoHeight$2}" src="${n}" muted loop autoplay hidden webkit-playsinline="true" playsinline="true" crossorigin="anonymous"></video>`, ffmcanvas = querySelectorEl("#ffmcanvas"), c2 = querySelectorEl("#digitalPlayer"), silentVideo$1 = querySelectorEl("#silentVideo"), displayEle$1(ffmcanvas, "none"), displayEle$1(c2, "none");
}
let xxPlayer$2 = class extends Emitter$2 {
  constructor({ environment: t, containerLable: n, token: r, projectId: l, quality: a, zoom: e, clientId: g, volume: _, asr: y }, x) {
    if (super(), y) {
      const { asrDestroy: E, asrWsAppoint: C, asrStart: L } = asrWs((A) => {
        console.log(A, "mic");
      });
      asrWsApp$2 = C, L();
    }
    emitter$2 = new Emitter$2(), this.containerLable = n, commonObj._sign = r, commonObj._projectId = l, this.quality = a || 1, this.zoom = e || 1, commonObj._env = t || "prd", commonObj._volume = _ || 1, commonObj._asr = y || !1, commonObj.decodeType = x.data.decodeType, reqRes$2 = x, this.streamImg = !1;
  }
  init() {
    checkCondition$2((t) => {
      if (t) {
        let { avatarSilenceUrl: n, avatarDirection: r } = reqRes$2.data;
        player$2(this.containerLable, r, n, this.quality, this.zoom), emitter$2.on("videoEnd", () => {
          this.emit("message", { type: "videoEnd", data: {} });
        }), emitter$2.on("videoStart", () => {
          this.emit("message", { type: "videoStart", data: {} });
        }), emitter$2.on("wsMessage", (l) => {
          this.emit("message", { type: "wsMessage", data: l });
        }), emitter$2.on("initIos", () => {
          this.emit("intialSucccess", { type: "2" });
        }), this.emit("intialSucccess", { type: "1" });
      } else
        this.emit("intialError", msg);
    });
  }
  playSilentvideo() {
    silentVideo$1 && silentVideo$1.play().then((t) => {
      console.log("ffm交互静音视频播放");
    }).catch((t) => {
      console.log("ffm交互静音视频播放失败-", t);
    });
  }
  startPlay() {
    ffmcanvas && (console.log("xiaohui"), displayEle$1(ffmcanvas, "none")), webglCut.load(null, silentVideo$1, c2, (t) => {
      videoPlayerInit$1 = !0, webglCut.slicePlay(), displayEle$1(c2, "inline"), startPlayer$2(this.direction, this.quality), emitter$2.emit("initIos");
    });
  }
  setClientId(t) {
    t ? commonObj._clientId = t : console.log("clientId不能为空");
  }
  stopPlay() {
    uninstallEvent$2(), emitter$2 = null, ffmcanvas = null, c2 = null, silentVideo$1 = null, videoWidth$2 = "", videoHeight$2 = "", reqRes$2 = null, this.streamImg = !1;
  }
  playQA(t, n) {
    websocket$2 == null || websocket$2.send(SendMsg.qa(t, n)), this.streamImg = !0;
  }
  interrupt() {
    websocket$2 == null || websocket$2.send(SendMsg.interrupt()), webglCut.slicePlay(), webReconnect$1(!0), this.streamImg = !1;
  }
  playText(t) {
    websocket$2 == null || websocket$2.send(SendMsg.text(t));
  }
  playStreamText(t) {
    websocket$2 == null || websocket$2.send(SendMsg.streamText(t));
  }
  playStreamTextStart(t, n) {
    websocket$2 == null || websocket$2.send(SendMsg.streamTextStart(t, n)), this.streamImg = !0;
  }
  playStreamTextEnd() {
    websocket$2 == null || websocket$2.send(SendMsg.streamTextEnd());
  }
  playAudio(t) {
    websocket$2 == null || websocket$2.send(SendMsg.streamAudio(t)), this.streamImg = !0;
  }
  playAudioEnd() {
    websocket$2 == null || websocket$2.send(SendMsg.streamAudioEnd());
  }
  playCurVideo() {
    this.streamImg && (websocket$2 == null || websocket$2.send(SendMsg.resumePlay()), ffmPlayer.player.continue());
  }
  stopCurVideo() {
    this.streamImg && (websocket$2 == null || websocket$2.send(SendMsg.pausePlay()), ffmPlayer.player.stop());
  }
};
function webRtcPlayer(f) {
  f = typeof f < "u" ? f : {};
  var t = this;
  this.cfg = typeof f.peerConnectionOptions < "u" ? f.peerConnectionOptions : {}, this.cfg.sdpSemantics = "unified-plan", this.cfg.offerExtmapAllowMixed = !1, this.pcClient = null, this.dcClient = null, this.tnClient = null, this._audio = null, this._volume = 1, this.sdpConstraints = {
    offerToReceiveAudio: 1,
    //Note: if you don't need audio you can get improved latency by turning this off.
    offerToReceiveVideo: 1,
    voiceActivityDetection: !1
  }, this.dataChannelOptions = { ordered: !0 }, this.startVideoMuted = typeof f.startVideoMuted < "u" ? f.startVideoMuted : !1, this.autoPlayAudio = typeof f.autoPlayAudio < "u" ? f.autoPlayAudio : !0;
  const n = new URLSearchParams(window.location.search);
  this.useMic = n.has("useMic"), this.useMic;
  let r = location.hostname === "localhost" || location.hostname === "127.0.0.1", l = location.protocol === "https:";
  this.useMic && !r && !l && (this.useMic = !1), this.latencyTestTimings = {
    TestStartTimeMs: null,
    UEReceiptTimeMs: null,
    UEPreCaptureTimeMs: null,
    UEPostCaptureTimeMs: null,
    UEPreEncodeTimeMs: null,
    UEPostEncodeTimeMs: null,
    UETransmissionTimeMs: null,
    BrowserReceiptTimeMs: null,
    FrameDisplayDeltaTimeMs: null,
    Reset: function() {
      this.TestStartTimeMs = null, this.UEReceiptTimeMs = null, this.UEPreCaptureTimeMs = null, this.UEPostCaptureTimeMs = null, this.UEPreEncodeTimeMs = null, this.UEPostEncodeTimeMs = null, this.UETransmissionTimeMs = null, this.BrowserReceiptTimeMs = null, this.FrameDisplayDeltaTimeMs = null;
    },
    SetUETimings: function(w) {
      this.UEReceiptTimeMs = w.ReceiptTimeMs, this.UEPreCaptureTimeMs = w.PreCaptureTimeMs, this.UEPostCaptureTimeMs = w.PostCaptureTimeMs, this.UEPreEncodeTimeMs = w.PreEncodeTimeMs, this.UEPostEncodeTimeMs = w.PostEncodeTimeMs, this.UETransmissionTimeMs = w.TransmissionTimeMs, this.BrowserReceiptTimeMs = Date.now(), this.OnAllLatencyTimingsReady(this);
    },
    SetFrameDisplayDeltaTime: function(w) {
      this.FrameDisplayDeltaTimeMs == null && (this.FrameDisplayDeltaTimeMs = Math.round(w), this.OnAllLatencyTimingsReady(this));
    },
    OnAllLatencyTimingsReady: function(w) {
    }
  }, this.createWebRtcVideo = function() {
    var w = document.createElement("video");
    if (w.id = "digital3DPlayer", w.playsInline = !0, w.disablepictureinpicture = !0, w.muted = t.startVideoMuted, w.autoplay = "autoplay", w.hidden = !0, w.addEventListener("loadedmetadata", function(S) {
      t.onVideoInitialised && t.onVideoInitialised();
    }, !0), "requestVideoFrameCallback" in HTMLVideoElement.prototype) {
      const S = (O, F) => {
        if (F.receiveTime && F.expectedDisplayTime) {
          const j = F.presentationTime - F.receiveTime;
          t.aggregatedStats.receiveToCompositeMs = j;
        }
        w.requestVideoFrameCallback(S);
      };
      w.requestVideoFrameCallback(S);
    }
    return w;
  }, this.video = this.createWebRtcVideo();
  const a = function(w) {
  }, e = function(w) {
  }, g = function(w) {
  }, _ = function(w) {
    if (w.track, w.track.kind == "audio") {
      y(w.streams[0]);
      return;
    } else
      w.track.kind == "video" && (t.video.srcObject, w.streams[0]);
    {
      t.video.srcObject = w.streams[0];
      return;
    }
  }, y = function(w) {
    if (t.video.srcObject != w && t.video.srcObject && t.video.srcObject !== w) {
      let S = document.createElement("Audio");
      if (t._audio = S, S.volume = t._volume, S.srcObject = w, t.autoPlayAudio)
        S.play();
      else {
        let O = function() {
          S.play(), t.video.removeEventListener("click", O);
        };
        t.video.addEventListener("click", O);
      }
    }
  }, x = function(w, S, O) {
    try {
      let F = w.createDataChannel(S, O);
      return F.binaryType = "arraybuffer", F.onopen = function(j) {
        t.onDataChannelConnected && t.onDataChannelConnected();
      }, F.onclose = function(j) {
      }, F.onmessage = function(j) {
        t.onDataChannelMessage && t.onDataChannelMessage(j.data);
      }, F;
    } catch {
      return null;
    }
  }, E = function(w) {
    w.candidate && w.candidate.candidate && t.onWebRtcCandidate(w.candidate);
  }, C = function(w) {
    w.createOffer(t.sdpConstraints).then(
      function(S) {
        L(S), w.setLocalDescription(S), t.onWebRtcOffer && t.onWebRtcOffer(S);
      },
      function() {
        console.warn("Couldn't create offer");
      }
    );
  }, L = function(w) {
    w.sdp = w.sdp.replace("useinbandfec=1", "useinbandfec=1;stereo=1;sprop-maxcapturerate=48000");
  }, A = function(w) {
    w.SetBitrate && (w.onsignalingstatechange = a), w.oniceconnectionstatechange = e, w.onicegatheringstatechange = g, w.ontrack = _, w.onicecandidate = E;
  }, I = function() {
    return t.aggregatedStats || (t.aggregatedStats = {}), function(w) {
      let S = {};
      w.forEach((O) => {
        O.type == "inbound-rtp" && !O.isRemote && (O.mediaType == "video" || O.id.toLowerCase().includes("video")) && (S.timestamp = O.timestamp, S.bytesReceived = O.bytesReceived, S.framesDecoded = O.framesDecoded, S.packetsLost = O.packetsLost, S.bytesReceivedStart = t.aggregatedStats && t.aggregatedStats.bytesReceivedStart ? t.aggregatedStats.bytesReceivedStart : O.bytesReceived, S.framesDecodedStart = t.aggregatedStats && t.aggregatedStats.framesDecodedStart ? t.aggregatedStats.framesDecodedStart : O.framesDecoded, S.timestampStart = t.aggregatedStats && t.aggregatedStats.timestampStart ? t.aggregatedStats.timestampStart : O.timestamp, t.aggregatedStats && t.aggregatedStats.timestamp && (t.aggregatedStats.bytesReceived && (S.bitrate = 8 * (S.bytesReceived - t.aggregatedStats.bytesReceived) / (S.timestamp - t.aggregatedStats.timestamp), S.bitrate = Math.floor(S.bitrate), S.lowBitrate = t.aggregatedStats.lowBitrate && t.aggregatedStats.lowBitrate < S.bitrate ? t.aggregatedStats.lowBitrate : S.bitrate, S.highBitrate = t.aggregatedStats.highBitrate && t.aggregatedStats.highBitrate > S.bitrate ? t.aggregatedStats.highBitrate : S.bitrate), t.aggregatedStats.bytesReceivedStart && (S.avgBitrate = 8 * (S.bytesReceived - t.aggregatedStats.bytesReceivedStart) / (S.timestamp - t.aggregatedStats.timestampStart), S.avgBitrate = Math.floor(S.avgBitrate)), t.aggregatedStats.framesDecoded && (S.framerate = (S.framesDecoded - t.aggregatedStats.framesDecoded) / ((S.timestamp - t.aggregatedStats.timestamp) / 1e3), S.framerate = Math.floor(S.framerate), S.lowFramerate = t.aggregatedStats.lowFramerate && t.aggregatedStats.lowFramerate < S.framerate ? t.aggregatedStats.lowFramerate : S.framerate, S.highFramerate = t.aggregatedStats.highFramerate && t.aggregatedStats.highFramerate > S.framerate ? t.aggregatedStats.highFramerate : S.framerate), t.aggregatedStats.framesDecodedStart && (S.avgframerate = (S.framesDecoded - t.aggregatedStats.framesDecodedStart) / ((S.timestamp - t.aggregatedStats.timestampStart) / 1e3), S.avgframerate = Math.floor(S.avgframerate)))), O.type == "track" && (O.trackIdentifier == "video_label" || O.kind == "video") && (S.framesDropped = O.framesDropped, S.framesReceived = O.framesReceived, S.framesDroppedPercentage = O.framesDropped / O.framesReceived * 100, S.frameHeight = O.frameHeight, S.frameWidth = O.frameWidth, S.frameHeightStart = t.aggregatedStats && t.aggregatedStats.frameHeightStart ? t.aggregatedStats.frameHeightStart : O.frameHeight, S.frameWidthStart = t.aggregatedStats && t.aggregatedStats.frameWidthStart ? t.aggregatedStats.frameWidthStart : O.frameWidth), O.type == "candidate-pair" && O.hasOwnProperty("currentRoundTripTime") && O.currentRoundTripTime != 0 && (S.currentRoundTripTime = O.currentRoundTripTime);
      }), t.aggregatedStats.receiveToCompositeMs && (S.receiveToCompositeMs = t.aggregatedStats.receiveToCompositeMs, t.latencyTestTimings.SetFrameDisplayDeltaTime(t.aggregatedStats.receiveToCompositeMs)), t.aggregatedStats = S, t.onAggregatedStats && t.onAggregatedStats(S);
    };
  }, D = async function(w) {
    if (w.addTransceiver("video", { direction: "recvonly" }), !t.useMic)
      w.addTransceiver("audio", { direction: "recvonly" });
    else {
      let S = t.useMic ? {
        autoGainControl: !1,
        channelCount: 1,
        echoCancellation: !1,
        latency: 0,
        noiseSuppression: !1,
        sampleRate: 16e3,
        volume: 1
      } : !1;
      const O = await navigator.mediaDevices.getUserMedia({ video: !1, audio: S });
      if (O)
        for (const F of O.getTracks())
          F.kind && F.kind == "audio" && w.addTransceiver(F, { direction: "sendrecv" });
      else
        w.addTransceiver("audio", { direction: "recvonly" });
    }
  };
  this.setVideoEnabled = function(w) {
    t.video.srcObject.getTracks().forEach((S) => S.enabled = w);
  }, this.startLatencyTest = function(w) {
    t.video && (t.latencyTestTimings.Reset(), t.latencyTestTimings.TestStartTimeMs = Date.now(), w(t.latencyTestTimings.TestStartTimeMs));
  }, this.handleCandidateFromServer = function(w) {
    let S = new RTCIceCandidate(w);
    t.pcClient.addIceCandidate(S).then((O) => {
    });
  }, this.createOffer = function() {
    t.pcClient && (t.pcClient.close(), t.pcClient = null), t.pcClient = new RTCPeerConnection(t.cfg), D(t.pcClient).finally(function() {
      A(t.pcClient), t.dcClient = x(t.pcClient, "cirrus", t.dataChannelOptions), C(t.pcClient);
    });
  }, this.receiveAnswer = function(w) {
    var S = new RTCSessionDescription(w);
    t.pcClient.setRemoteDescription(S);
    let O = t.pcClient.getReceivers();
    for (let F of O)
      F.playoutDelayHint = 0;
  }, this.close = function() {
    t.pcClient && (t.pcClient.close(), t.pcClient = null), t.aggregateStatsIntervalId && clearInterval(t.aggregateStatsIntervalId);
  }, this.send = function(w) {
    t.dcClient && t.dcClient.readyState == "open" && t.dcClient.send(w);
  }, this.getStats = function(w) {
    t.pcClient && w && t.pcClient.getStats(null).then((S) => {
      w(S);
    });
  }, this.aggregateStats = function(w) {
    let S = I(), O = () => {
      t.getStats(S);
    };
    t.aggregateStatsIntervalId = setInterval(O, w);
  }, this.changeVol = function(w) {
    this._volume = w, this._audio && (this._audio.volume = w);
  };
}
let webSocketUrl = null, successCallback = () => {
}, failCallback = () => {
}, interactiveTimeExpiredCallback = () => {
}, kbEvent = document.createEvent("KeyboardEvent");
typeof kbEvent.initKeyboardEvent < "u";
let webRtcPlayerObj = null, ws;
const WS_OPEN_STATE = 1;
let lastTimeResized = (/* @__PURE__ */ new Date()).getTime(), resizeTimeout, responseEventListeners = /* @__PURE__ */ new Map(), freezeFrameOverlay = null, shouldShowPlayOverlay = !0, freezeFrame = {
  receiving: !1,
  size: 0,
  jpeg: void 0,
  height: 0,
  width: 0,
  valid: !1
}, afk = {
  enabled: !0,
  // Set to true to enable the AFK system.
  warnTimeout: 9999999,
  // The time to elapse before warning the user they are inactive.
  closeTimeout: 10,
  // The time after the warning when we disconnect the user.
  active: !1,
  // Whether the AFK system is currently looking for inactivity.
  overlay: void 0,
  // The UI overlay warning the user that they are inactive.
  warnTimer: void 0,
  // The timer which waits to show the inactivity warning overlay.
  countdown: 0,
  // The inactivity warning overlay has a countdown to show time until disconnect.
  countdownTimer: void 0
  // The timer used to tick the seconds shown on the inactivity warning overlay.
}, editTextButton, hiddenInput;
function setOverlay(f, t, n) {
  let r = document.getElementById("videoPlayOverlay");
  if (!r) {
    let a = document.getElementById("player");
    r = document.createElement("div"), r.id = "videoPlayOverlay", a && a.appendChild(r);
  }
  for (; r.lastChild; )
    r.removeChild(r.lastChild);
  t && r.appendChild(t), n && r.addEventListener("click", function a(e) {
    n(e), r.removeEventListener("click", a);
  });
  let l = r.classList;
  for (let a = l.length - 1; a >= 0; a--)
    l.remove(l[a]);
  r.classList.add(f);
}
function showConnectOverlay() {
  connect(), startAfkWarningTimer();
}
function showTextOverlay(f) {
  let t = document.createElement("div");
  t.id = "messageOverlay", t.innerHTML = f || "", setOverlay("textDisplayState", t);
}
function showAfkOverlay() {
  stopAfkWarningTimer(), afk.overlay = document.createElement("div"), afk.overlay.id = "afkOverlay", setOverlay("clickableState", afk.overlay, (f) => {
    hideOverlay(), clearInterval(afk.countdownTimer), startAfkWarningTimer();
  }), afk.countdown = afk.closeTimeout, document.exitPointerLock(), afk.countdownTimer = setInterval(function() {
    afk.countdown--, afk.countdown == 0 && (hideOverlay(), ws.close(), clearInterval(afk.countdownTimer));
  }, 1e3);
}
function hideOverlay() {
  setOverlay("hiddenState");
}
function startAfkWarningTimer() {
  afk.active = afk.enabled, resetAfkWarningTimer();
}
function stopAfkWarningTimer() {
  afk.active = !1;
}
let num = afk.warnTimeout, fiveMinuteTimer = null;
function resetAfkWarningTimer() {
  afk.active && (num = afk.warnTimeout, clearTimeout(afk.warnTimer), clearInterval(afk.countdownTimer), clearInterval(fiveMinuteTimer), fiveMinuteTimer = setInterval(() => {
    num--, num === 0 && interactiveTimeExpiredCallback && interactiveTimeExpiredCallback(!0);
  }, 1e3), afk.warnTimer = setTimeout(function() {
    showAfkOverlay();
  }, afk.warnTimeout * 1e3));
}
function createWebRtcOffer() {
  webRtcPlayerObj ? (console.log("Creating offer"), webRtcPlayerObj.createOffer()) : (console.log("WebRTC player not setup, cannot create offer"), showTextOverlay("Unable to setup video"));
}
function sendInputData(f) {
  webRtcPlayerObj && (interactiveTimeExpiredCallback && interactiveTimeExpiredCallback(!1), afk.active = afk.enabled, resetAfkWarningTimer(), webRtcPlayerObj.send(f));
}
const ToClientMessageType = {
  QualityControlOwnership: 0,
  Response: 1,
  Command: 2,
  FreezeFrame: 3,
  UnfreezeFrame: 4,
  VideoEncoderAvgQP: 5,
  LatencyTest: 6,
  InitialSettings: 7
};
let VideoEncoderQP = "N/A";
function setupWebRtcPlayer(f, t) {
  webRtcPlayerObj = new webRtcPlayer(t), f.appendChild(webRtcPlayerObj.video), webRtcPlayerObj.onWebRtcOffer = function(l) {
    if (ws && ws.readyState === WS_OPEN_STATE) {
      let a = JSON.stringify(l);
      ws.send(a);
    }
  }, webRtcPlayerObj.onWebRtcCandidate = function(l) {
    ws && ws.readyState === WS_OPEN_STATE && ws.send(
      JSON.stringify({
        type: "iceCandidate",
        candidate: l
      })
    );
  }, webRtcPlayerObj.onVideoInitialised = function() {
    ws && ws.readyState === WS_OPEN_STATE && shouldShowPlayOverlay && resizePlayerStyle();
  }, webRtcPlayerObj.onDataChannelConnected = function() {
    ws && ws.readyState === WS_OPEN_STATE && webRtcPlayerObj.video && webRtcPlayerObj.video.srcObject && webRtcPlayerObj.onVideoInitialised && (webRtcPlayerObj.onVideoInitialised(), successCallback && successCallback(ws));
  };
  function n() {
    let l = btoa(
      freezeFrame.jpeg.reduce(
        (e, g) => e + String.fromCharCode(g),
        ""
      )
    ), a = document.getElementById("freezeFrameOverlay").childNodes[0];
    a.src = "data:image/jpeg;base64," + l, a.onload = function() {
      freezeFrame.height = a.naturalHeight, freezeFrame.width = a.naturalWidth, resizeFreezeFrameOverlay(), shouldShowPlayOverlay ? resizePlayerStyle() : showFreezeFrameOverlay(), webRtcPlayerObj.setVideoEnabled(!1);
    };
  }
  function r(l) {
    freezeFrame.receiving || (freezeFrame.receiving = !0, freezeFrame.valid = !1, freezeFrame.size = 0, freezeFrame.jpeg = void 0), freezeFrame.size = new DataView(l.slice(1, 5).buffer).getInt32(0, !0);
    let a = l.slice(1 + 4);
    if (freezeFrame.jpeg) {
      let e = new Uint8Array(freezeFrame.jpeg.length + a.length);
      e.set(freezeFrame.jpeg, 0), e.set(a, freezeFrame.jpeg.length), freezeFrame.jpeg = e;
    } else
      freezeFrame.jpeg = a, freezeFrame.receiving = !0, console.log(
        `received first chunk of freeze frame: ${freezeFrame.jpeg.length}/${freezeFrame.size}`
      );
    freezeFrame.jpeg.length === freezeFrame.size ? (freezeFrame.receiving = !1, freezeFrame.valid = !0, console.log(`received complete freeze frame ${freezeFrame.size}`), n()) : freezeFrame.jpeg.length > freezeFrame.size && (console.error(
      `received bigger freeze frame than advertised: ${freezeFrame.jpeg.length}/${freezeFrame.size}`
    ), freezeFrame.jpeg = void 0, freezeFrame.receiving = !1);
  }
  return webRtcPlayerObj.onDataChannelMessage = function(l) {
    let a = new Uint8Array(l);
    if (a[0] === ToClientMessageType.QualityControlOwnership) {
      let e = a[1] !== 0;
      console.log(
        "Received quality controller message, will control quality: " + e
      );
    } else if (a[0] === ToClientMessageType.Response) {
      let e = new TextDecoder("utf-16").decode(l.slice(1));
      for (let g of responseEventListeners.values())
        g(e);
    } else if (a[0] === ToClientMessageType.Command) {
      let e = new TextDecoder("utf-16").decode(l.slice(1));
      console.log(e);
      let g = JSON.parse(e);
      g.command === "onScreenKeyboard" && showOnScreenKeyboard(g);
    } else if (a[0] === ToClientMessageType.FreezeFrame)
      r(a);
    else if (a[0] === ToClientMessageType.UnfreezeFrame)
      invalidateFreezeFrameOverlay();
    else if (a[0] === ToClientMessageType.VideoEncoderAvgQP)
      VideoEncoderQP = new TextDecoder("utf-16").decode(l.slice(1));
    else if (a[0] == ToClientMessageType.LatencyTest) {
      let e = new TextDecoder("utf-16").decode(
        l.slice(1)
      );
      console.log("Got latency timings from UE."), console.log(e);
      let g = JSON.parse(e);
      webRtcPlayerObj && webRtcPlayerObj.latencyTestTimings.SetUETimings(g);
    } else if (a[0] == ToClientMessageType.InitialSettings) {
      let e = new TextDecoder("utf-16").decode(l.slice(1));
      JSON.parse(e);
    } else
      console.error(`unrecognized data received, packet ID ${a[0]}`);
  }, createWebRtcOffer(), webRtcPlayerObj.video;
}
function onWebRtcAnswer(f) {
  webRtcPlayerObj.receiveAnswer(f), webRtcPlayerObj.onAggregatedStats = (t) => {
    let n = new Intl.NumberFormat(window.navigator.language, {
      maximumFractionDigits: 0
    }), r = new Intl.NumberFormat(window.navigator.language, {
      maximumFractionDigits: 0,
      minimumIntegerDigits: 2
    }), l = (t.timestamp - t.timestampStart) / 1e3, a = [], e = [60, 60];
    for (let w = 0; w < e.length; w++)
      a.push(l % e[w]), l = l / e[w];
    a.push(l);
    let g = a[0], _ = Math.floor(a[1]), y = Math.floor([a[2]]), x = "B", E = t.hasOwnProperty("bytesReceived") ? t.bytesReceived : 0, C = ["kB", "MB", "GB"];
    for (let w = 0; w < C.length && !(E < 100 * 1e3); w++)
      E = E / 1e3, x = C[w];
    document.getElementById("qualityStatus");
    const L = 26, A = 35;
    let I = "", D = "lime";
    VideoEncoderQP > A ? (D = "red", I += `<div style="color: ${D}">Bad network connection</div>`) : VideoEncoderQP > L && (D = "orange", I += `<div style="color: ${D}">Spotty network connection</div>`), I += `<div>Duration: ${r.format(
      y
    )}:${r.format(_)}:${r.format(
      g
    )}</div>`, I += `<div>Video Resolution: ${t.hasOwnProperty("frameWidth") && t.frameWidth && t.hasOwnProperty("frameHeight") && t.frameHeight ? t.frameWidth + "x" + t.frameHeight : "Chrome only"}</div>`, I += `<div>Received (${x}): ${n.format(
      E
    )}</div>`, I += `<div>Frames Decoded: ${t.hasOwnProperty("framesDecoded") ? n.format(t.framesDecoded) : "Chrome only"}</div>`, I += `<div>Packets Lost: ${t.hasOwnProperty("packetsLost") ? n.format(t.packetsLost) : "Chrome only"}</div>`, I += `<div style="color: ${D}">Bitrate (kbps): ${t.hasOwnProperty("bitrate") ? n.format(t.bitrate) : "Chrome only"}</div>`, I += `<div>Framerate: ${t.hasOwnProperty("framerate") ? n.format(t.framerate) : "Chrome only"}</div>`, I += `<div>Frames dropped: ${t.hasOwnProperty("framesDropped") ? n.format(t.framesDropped) : "Chrome only"}</div>`, I += `<div>Net RTT (ms): ${t.hasOwnProperty("currentRoundTripTime") ? n.format(t.currentRoundTripTime * 1e3) : "Can't calculate"}</div>`, I += `<div>Browser receive to composite (ms): ${t.hasOwnProperty("receiveToCompositeMs") ? n.format(t.receiveToCompositeMs) : "Chrome only"}</div>`, I += `<div style="color: ${D}">Video Quantization Parameter: ${VideoEncoderQP}</div>`;
  }, webRtcPlayerObj.aggregateStats(
    1 * 1e3
    /*Check every 1 second*/
  ), webRtcPlayerObj.latencyTestTimings.OnAllLatencyTimingsReady = function(t) {
    if (!t.BrowserReceiptTimeMs)
      return;
    let n = t.BrowserReceiptTimeMs - t.TestStartTimeMs, r = t.UEPreEncodeTimeMs == 0 || t.UEPreCaptureTimeMs == 0 ? "???" : t.UEPostEncodeTimeMs - t.UEPreCaptureTimeMs, l = t.UEPostCaptureTimeMs - t.UEPreCaptureTimeMs, a = t.UEPostEncodeTimeMs - t.UEPreEncodeTimeMs, e = t.UETransmissionTimeMs - t.UEReceiptTimeMs, g = n - e, _ = n - g - e, y = null, x = null;
    t.FrameDisplayDeltaTimeMs && t.BrowserReceiptTimeMs && (y = t.FrameDisplayDeltaTimeMs + n, x = y - g - e);
    let E = "";
    E += `<div>Net latency RTT (ms): ${g}</div>`, E += `<div>UE Capture+Encode (ms): ${r}</div>`, E += `<div>UE Capture (ms): ${l}</div>`, E += `<div>UE Encode (ms): ${a}</div>`, E += `<div>Total UE latency (ms): ${e}</div>`, E += `<div>Browser send latency (ms): ${_}</div>`, E += t.FrameDisplayDeltaTimeMs && t.BrowserReceiptTimeMs ? `<div>Browser receive latency (ms): ${t.FrameDisplayDeltaTimeMs}</div>` : "", E += x ? `<div>Total browser latency (ms): ${x}</div>` : "", E += `<div>Total latency (excluding browser) (ms): ${n}</div>`, E += y ? `<div>Total latency (ms): ${y}</div>` : "", document.getElementById("LatencyStats").innerHTML = E;
  };
}
function onWebRtcIce(f) {
  webRtcPlayerObj && webRtcPlayerObj.handleCandidateFromServer(f);
}
let styleWidth, styleHeight, styleTop, styleLeft, styleCursor = "default", styleAdditional;
function resizePlayerStyleToFillWindow(f) {
  let t = f.getElementsByTagName("VIDEO"), n = window.innerHeight / window.innerWidth, r = f.clientHeight / f.clientWidth, l = t.videoHeight / t.videoWidth;
  isNaN(l) ? (styleWidth = window.innerWidth, styleHeight = window.innerHeight, styleTop = 0, styleLeft = 0, f.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional) : n < r ? (styleWidth = Math.floor(window.innerHeight / l), styleHeight = window.innerHeight, styleTop = 0, styleLeft = Math.floor((window.innerWidth - styleWidth) * 0.5), f.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional) : (styleWidth = window.innerWidth, styleHeight = Math.floor(window.innerWidth * l), styleTop = Math.floor((window.innerHeight - styleHeight) * 0.5), styleLeft = 0, f.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional);
}
function resizePlayerStyleToActualSize(f) {
  let t = f.getElementsByTagName("VIDEO");
  if (t.length > 0) {
    styleWidth = t[0].videoWidth, styleHeight = t[0].videoHeight;
    let n = Math.floor((window.innerHeight - styleHeight) * 0.5), r = Math.floor((window.innerWidth - styleWidth) * 0.5);
    styleTop = n > 0 ? n : 0, styleLeft = r > 0 ? r : 0, f.style = "top: " + styleTop + "px; left: " + styleLeft + "px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
  }
}
function resizePlayerStyleToArbitrarySize(f) {
  f.getElementsByTagName("VIDEO"), f.style = "top: 0px; left: 0px; width: " + styleWidth + "px; height: " + styleHeight + "px; cursor: " + styleCursor + "; " + styleAdditional;
}
function showFreezeFrameOverlay() {
  freezeFrame.valid && (freezeFrameOverlay.classList.add("freezeframeBackground"), freezeFrameOverlay.style.display = "block");
}
function invalidateFreezeFrameOverlay() {
  freezeFrameOverlay.style.display = "none", freezeFrame.valid = !1, freezeFrameOverlay.classList.remove("freezeframeBackground"), webRtcPlayerObj && webRtcPlayerObj.setVideoEnabled(!0);
}
function resizeFreezeFrameOverlay() {
  if (freezeFrame.width !== 0 && freezeFrame.height !== 0) {
    let f = 0, t = 0, n = 0, r = 0, l = document.getElementById(
      "enlarge-display-to-fill-window-tgl"
    ), a = document.getElementById("player");
    if (l !== null && l.checked) {
      let g = window.innerWidth / window.innerHeight, _ = freezeFrame.width / freezeFrame.height;
      g < _ ? (f = window.innerWidth, t = Math.floor(window.innerWidth / _), n = Math.floor((window.innerHeight - t) * 0.5), r = 0) : (f = Math.floor(window.innerHeight * _), t = window.innerHeight, n = 0, r = Math.floor((window.innerWidth - f) * 0.5));
    } else {
      let g = a.offsetWidth / a.offsetHeight, _ = freezeFrame.width / freezeFrame.height;
      g < _ ? (f = a.offsetWidth, t = Math.floor(
        a.offsetWidth / _
      ), n = Math.floor(
        (a.offsetHeight - t) * 0.5
      ), r = 0) : (f = Math.floor(
        a.offsetHeight * _
      ), t = a.offsetHeight, n = 0, r = Math.floor(
        (a.offsetWidth - f) * 0.5
      ));
    }
    let e = document.getElementById("freezeFrameOverlay").childNodes[0];
    freezeFrameOverlay.style.width = a.offsetWidth + "px", freezeFrameOverlay.style.height = a.offsetHeight + "px", freezeFrameOverlay.style.left = "0px", freezeFrameOverlay.style.top = "0px", e.style.width = f + "px", e.style.height = t + "px", e.style.left = r + "px", e.style.top = n + "px";
  }
}
function resizePlayerStyle(f) {
  let t = document.getElementById("player");
  if (!t)
    return;
  if (updateVideoStreamSize(), t.classList.contains("fixed-size")) {
    setupMouseAndFreezeFrame(t);
    return;
  }
  let n = document.getElementById("enlarge-display-to-fill-window-tgl"), r = window.innerWidth < t.videoWidth || window.innerHeight < t.videoHeight;
  n !== null ? n.checked || r ? resizePlayerStyleToFillWindow(t) : resizePlayerStyleToActualSize(t) : resizePlayerStyleToArbitrarySize(t), setupMouseAndFreezeFrame(t);
}
function setupMouseAndFreezeFrame(f) {
  f.getBoundingClientRect(), setupNormalizeAndQuantize(), resizeFreezeFrameOverlay();
}
function updateVideoStreamSize() {
  if ((/* @__PURE__ */ new Date()).getTime() - lastTimeResized > 1e3) {
    if (!document.getElementById("player"))
      return;
    lastTimeResized = (/* @__PURE__ */ new Date()).getTime();
  } else
    console.log("Resizing too often - skipping"), clearTimeout(resizeTimeout), resizeTimeout = setTimeout(updateVideoStreamSize, 1e3);
}
const MessageType = {
  /**********************************************************************/
  /*
   * Control Messages. Range = 0..49.
   */
  IFrameRequest: 0,
  RequestQualityControl: 1,
  MaxFpsRequest: 2,
  AverageBitrateRequest: 3,
  StartStreaming: 4,
  StopStreaming: 5,
  LatencyTest: 6,
  RequestInitialSettings: 7,
  /**********************************************************************/
  /*
   * Input Messages. Range = 50..89.
   */
  // Generic Input Messages. Range = 50..59.
  UIInteraction: 50,
  Command: 51,
  // Keyboard Input Message. Range = 60..69.
  KeyDown: 60,
  KeyUp: 61,
  KeyPress: 62,
  // Mouse Input Messages. Range = 70..79.
  MouseEnter: 70,
  MouseLeave: 71,
  MouseDown: 72,
  MouseUp: 73,
  MouseMove: 74,
  MouseWheel: 75,
  // Touch Input Messages. Range = 80..89.
  TouchStart: 80,
  TouchEnd: 81,
  TouchMove: 82,
  // Gamepad Input Messages. Range = 90..99
  GamepadButtonPressed: 90,
  GamepadButtonReleased: 91,
  GamepadAnalog: 92
  /**************************************************************************/
};
function emitDescriptor(f, t) {
  let n = JSON.stringify(t), r = new DataView(
    new ArrayBuffer(1 + 2 + 2 * n.length)
  ), l = 0;
  r.setUint8(l, f), l++, r.setUint16(l, n.length, !0), l += 2;
  for (let a = 0; a < n.length; a++)
    r.setUint16(l, n.charCodeAt(a), !0), l += 2;
  sendInputData(r.buffer);
}
function emitUIInteraction(f) {
  emitDescriptor(MessageType.UIInteraction, f);
}
function setupNormalizeAndQuantize() {
  let f = document.getElementById("player"), t = f.getElementsByTagName("video");
  f && t.length > 0 && (f.clientHeight / f.clientWidth, t[0].videoHeight / t[0].videoWidth);
}
function showOnScreenKeyboard(f) {
  if (f.showOnScreenKeyboard) {
    editTextButton.classList.remove("hiddenState");
    let t = unquantizeAndDenormalizeUnsigned(f.x, f.y);
    editTextButton.style.top = t.y.toString() + "px", editTextButton.style.left = (t.x - 40).toString() + "px";
  } else
    editTextButton.classList.add("hiddenState"), hiddenInput.blur();
}
function start() {
  let f = document.getElementById("qualityStatus");
  f && (f.className = "grey-status");
  let t = document.getElementById("stats");
  t && (t.innerHTML = "Not connected"), showConnectOverlay(), shouldShowPlayOverlay = !0, resizePlayerStyle(), updateKickButton(0);
}
function updateKickButton(f) {
  let t = document.getElementById("kick-other-players-button");
  t && (t.value = `Kick (${f})`);
}
function get_text(f) {
  return String.fromCharCode.apply(null, new Uint8Array(f.slice(0, 5))) == "text:" ? new TextDecoder("utf-8").decode(new Uint8Array(f.slice(5))) : "";
}
function connect() {
  if (window.WebSocket = window.WebSocket || window.MozWebSocket, !window.WebSocket) {
    alert("Your browser doesn't support WebSocket");
    return;
  }
  console.log("webSocketUrl:", webSocketUrl), ws = new WebSocket(webSocketUrl), ws.binaryType = "arraybuffer", ws.onmessage = function(t) {
    let n = t.data;
    const r = new Uint8Array(t.data);
    r[0] === 116 && r[1] === 101 && r[2] === 120 && r[3] === 116 && (n = get_text(r));
    let l = JSON.parse(n);
    l.type === "config" ? onConfig(l) : l.type === "playerCount" ? updateKickButton(l.count - 1) : l.type === "answer" ? onWebRtcAnswer(l) : l.type === "iceCandidate" && onWebRtcIce(l.candidate);
  }, ws.onerror = function(t) {
    console.log(`WS error: ${JSON.stringify(t)}`);
  };
  let f = null;
  ws.onclose = function(t) {
    clearInterval(fiveMinuteTimer), clearTimeout(afk.warnTimer), clearInterval(afk.countdownTimer), ws = void 0;
    let n = document.getElementById("player");
    webRtcPlayerObj && (n && n.removeChild(webRtcPlayerObj.video), webRtcPlayerObj.close(), webRtcPlayerObj = void 0), failCallback && failCallback(), f = setTimeout(start, 4e3), clearTimeout(f);
  };
}
function onConfig(f) {
  let t = document.getElementById("player");
  setupWebRtcPlayer(t, f), resizePlayerStyle();
}
function close$1() {
  ws && ws.close();
}
function load(f) {
  f.successCallback && (successCallback = f.successCallback), f.failCallback && (failCallback = f.failCallback), f.totalTimeExpiredCallback && f.totalTimeExpiredCallback, f.interactiveTimeExpiredCallback && (interactiveTimeExpiredCallback = f.interactiveTimeExpiredCallback), f.webSocketUrl && (webSocketUrl = f.webSocketUrl), start();
}
function changeVol(f) {
  webRtcPlayerObj.video.volume = f, webRtcPlayerObj.changeVol(f);
}
let webrtc = {
  load,
  resizePlayerStyle,
  emitUIInteraction,
  close: close$1,
  changeVol
};
const isPlat$1 = judgeEnvironment().includes("Chrome");
let pacemaker$1 = !1, websocket$1 = null, rtccanvas = null, digital3D = null, interval$1 = 5, videoWidth$1 = "", videoHeight$1 = "", reqRes$1 = null, emitter$1 = new Emitter$2();
const lvCutInitStart = () => {
  const f = commonObj.scene == "1" || commonObj.scene == null || commonObj.sceneId >= 1e3 ? "" : "fragment-shader-nocut";
  digital3D = querySelectorEl("#digital3DPlayer"), console.log("---digital3D", digital3D), digital3D.width = videoWidth$1, digital3D.height = videoHeight$1, webglCut.load(digital3D, null, rtccanvas, () => {
    webglCut.videoPlay();
  }, f), emitter$1.emit("init3d");
}, checkCondition$1 = (f) => {
  "WebSocket" in window ? f(!0, "success") : f(!1, "当前浏览器不支持websocketio连接");
}, loopConnect$1 = () => {
  uninstallEvent$1(!1), startPlayer$1();
}, pageAcitveStatusGet$1 = () => {
  (() => {
    setTimeout(() => {
      interval$1 += 5, interval$1 > 30 && (interval$1 = 30), loopConnect$1();
    }, interval$1 * 1e3);
  })();
}, uninstallEvent$1 = (f = !0) => {
  pacemaker$1 = f, heartPing.end(), close(), websocket$1 && (websocket$1.close(), websocket$1 = null);
}, initWebSocket = (f) => {
  const t = f.ws();
  websocket$1 = t, t.binaryType = "arraybuffer", t.onopen = f.cbOpen, t.onclose = f.cbClose, t.onmessage = f.cbMessage, t.onerror = f.cbError;
};
let asrWsApp$1 = null;
const startPlayer$1 = () => {
  let { _sign: f, _projectId: t, _drivertype: n, _volume: r, _asr: l } = commonObj;
  initWebSocket({
    cbOpen: function(a) {
      console.log("建立websocket", a), l && asrWsApp$1 && asrWsApp$1(websocket$1), heartPing.start(() => {
        (websocket$1 == null ? void 0 : websocket$1.readyState) == 1 && (websocket$1 == null || websocket$1.send(JSON.stringify({ signal: "ping" })));
      }), pacemaker$1 = !1;
    },
    cbMessage: isPlat$1 ? function(a) {
      if (typeof a.data == "object")
        new Uint8Array(a.data);
      else if (a.data != "ppg-end") {
        if (a.data.includes("requests overload"))
          pacemaker$1 = !0, emitter$1.emit("wsMessage", {
            type: "requests overload"
          });
        else if (a.data.includes("{")) {
          const e = JSON.parse(a.data);
          e.type == "asr-part" ? emitter$1.emit("wsMessage", e) : e.type == "asr" ? e != null && e.resultType ? emitter$1.emit("wsMessage", e) : emitter$1.emit("videoStart") : e.type == "answer" ? emitter$1.emit("wsMessage", e) : e.type == "startAsr" ? (emitter$1.emit("videoEnd"), websocket$1 == null || websocket$1.send(SendMsg.startAsr())) : e.type == "startSleep" || e.type == "wakeup" || (e.type == "server_ready" ? (console.error("可以发送语音文件"), emitter$1.emit("wsMessage", e)) : e.type == "server_ended" || (e.type == "error" ? (emitter$1.emit("wsMessage", e), console.error(e.content)) : e.type == "node" || e.type == "server_url" && (console.log("2----------3d---到这里"), treeDOpen(`wss://${e.content}`))));
        }
      }
    } : function(a) {
      const e = new Uint8Array(a.data);
      if (e[0] === 116 && e[1] === 101 && e[2] === 120 && e[3] === 116) {
        const g = get_text$1(e);
        if (g != "ppg-end") {
          if (g != "pong") {
            if (g.includes("requests overload"))
              pacemaker$1 = !0, emitter$1.emit("wsMessage", {
                type: "requests overload"
              });
            else if (g.includes("{")) {
              const _ = JSON.parse(g);
              _.type == "asr-part" ? emitter$1.emit("wsMessage", _) : _.type == "asr" ? _ != null && _.resultType ? emitter$1.emit("wsMessage", _) : emitter$1.emit("videoStart") : _.type == "answer" ? emitter$1.emit("wsMessage", _) : _.type == "startAsr" ? emitter$1.emit("videoEnd") : _.type == "startSleep" || _.type == "wakeup" || (_.type == "server_ready" ? (console.error("可以发送语音文件"), emitter$1.emit("wsMessage", _)) : _.type == "server_ended" || (_.type == "error" ? (emitter$1.emit("wsMessage", _), console.error(_.content)) : _.type == "node" || _.type == "server_url" && (console.log("1----------3d---到这里"), treeDOpen(`wss://${_.content}`))));
            }
          }
        }
      }
    },
    cbError: function(a) {
      console.error("websocket错误：", a), emitter$1.emit("wsMessage", {
        type: "websocket Error",
        value: a
      });
    },
    cbClose: function(a) {
      console.error("websocket关闭：", a), pacemaker$1 ? emitter$1.emit("wsMessage", {
        type: "websocket close"
      }) : (pageAcitveStatusGet$1(), emitter$1.emit("wsMessage", {
        type: "websocket reLoop"
      }));
    },
    ws: websocketInit$1({ _projectId: t, _sign: f, isPlat: isPlat$1, type: 1, _drivertype: n, requestVideo: requestVideo$1 })
  });
}, treeDOpen = (f) => {
  setTimeout(() => {
    webrtc.load({
      webSocketUrl: f,
      successCallback: (t) => {
        console.log("回调成功"), lvCutInitStart();
        let n = setInterval(() => {
          (t == null ? void 0 : t.readyState) == 3 ? clearInterval(n) : t == null || t.send(JSON.stringify({ signal: "ping" }));
        }, 1e4);
      },
      totalTimeExpiredCallback: (t) => {
        console.log("totalTimeExpiredCallback");
      },
      interactiveTimeExpiredCallback: (t) => {
        console.log("interactiveTimeExpiredCallback");
      },
      failCallback: (t) => {
        console.log("failCallback");
      }
    });
  });
}, close = () => {
  webrtc.close();
};
let requestVideo$1 = "";
function player$1(f, t, n, r, l = 1) {
  videoWidth$1 = viewMap[t][r].width, videoHeight$1 = viewMap[t][r].height, requestVideo$1 = `requestWidth=${videoWidth$1}&requestHeight=${videoHeight$1}`, document.querySelector(f).innerHTML = `
    <div style="position:relative; display: inline-block;">
      <canvas id="rtccanvas" style="zoom:${l}; position: absolute;" width="${videoWidth$1}" height="${videoHeight$1}"></canvas>
      <div style="zoom:${l}; width:${videoWidth$1}px; height:${videoHeight$1}px; display: inline-block;">
        <div id="player"></div>
      </div>
    </div>
    `, rtccanvas = querySelectorEl("#rtccanvas");
}
let xxPlayer$1 = class extends Emitter$2 {
  constructor({ environment: t, containerLable: n, token: r, projectId: l, quality: a, zoom: e, volume: g, asr: _ }, y) {
    if (super(), _) {
      const { asrDestroy: x, asrWsAppoint: E, asrStart: C } = asrWs((L) => {
        console.log(L, "mic");
      });
      asrWsApp$1 = E, C();
    }
    emitter$1 = new Emitter$2(), this.containerLable = n, commonObj._sign = r, commonObj._projectId = l, this.quality = a || 1, this.zoom = e || 1, commonObj._env = t || "prd", commonObj._volume = g || 1, commonObj._asr = _ || !1, reqRes$1 = y;
  }
  init() {
    checkCondition$1((t) => {
      if (t) {
        let { avatarSilenceUrl: n, avatarDirection: r, scene: l } = reqRes$1.data, a = l;
        if (l.trim().startsWith("{")) {
          let e = JSON.parse(l);
          e.id && (a = e.id);
        }
        commonObj.scene = a == 1 || a >= 1e3 ? "1" : "2", player$1(this.containerLable, r, n, this.quality, this.zoom), emitter$1.on("videoEnd", () => {
          this.emit("message", { type: "videoEnd", data: {} });
        }), emitter$1.on("videoStart", () => {
          this.emit("message", { type: "videoStart", data: {} });
        }), emitter$1.on("wsMessage", (e) => {
          this.emit("message", { type: "wsMessage", data: e });
        }), emitter$1.on("init3d", (e) => {
          this.emit("intialSucccess", { type: "2" });
        }), this.emit("intialSucccess", { type: "1" });
      } else
        this.emit("intialError", msg);
    });
  }
  playSilentvideo() {
    const t = document.querySelector("#digital3DPlayer");
    return t == null ? void 0 : t.play();
  }
  startPlay() {
    startPlayer$1();
  }
  setClientId(t) {
    t ? commonObj._clientId = t : console.log("clientId不能为空");
  }
  stopPlay() {
    uninstallEvent$1(), emitter$1 = null, rtccanvas = null, digital3D = null, reqRes$1 = null;
  }
  playQA(t, n) {
    websocket$1 == null || websocket$1.send(SendMsg.qa(t, n));
  }
  interrupt() {
    websocket$1 == null || websocket$1.send(SendMsg.interrupt());
  }
  playText(t) {
    websocket$1 == null || websocket$1.send(SendMsg.text(t));
  }
  playStreamText(t) {
    websocket$1 == null || websocket$1.send(SendMsg.streamText(t));
  }
  playStreamTextStart(t, n) {
    websocket$1 == null || websocket$1.send(SendMsg.streamTextStart(t, n));
  }
  playStreamTextEnd() {
    websocket$1 == null || websocket$1.send(SendMsg.streamTextEnd());
  }
  playAudio(t) {
    websocket$1 == null || websocket$1.send(SendMsg.streamAudio(t));
  }
  playAudioEnd() {
    websocket$1 == null || websocket$1.send(SendMsg.streamAudioEnd());
  }
  playCurVideo() {
    websocket$1 == null || websocket$1.send(SendMsg.resumePlay());
  }
  stopCurVideo() {
    websocket$1 == null || websocket$1.send(SendMsg.pausePlay());
  }
};
const websocketInit = (f, t, n, r) => {
  f && !f.includes("ws") && (f = `${f.includes("https") ? "wss:" : "ws:"}//${f.split("//")[1]}`);
  let l = `${f || "wss://wenyan-avatar.mobvoi.com"}/websocket/wenyan/asr/${n}?projectId=${t}&holdTalk=1`, a = new WebSocket(l);
  return a.binaryType = "arraybuffer", a.onopen = function(e) {
    console.log("客户端连接成功"), a.send(JSON.stringify({ signal: "start" }));
  }, a.onmessage = function(e) {
    const g = e.data ? JSON.parse(e.data) : {};
    r(g), g.type == "asr" && a.close();
  }, a.onerror = function(e) {
    console.log("连接失败了", e);
  }, a.onclose = function() {
    a = null;
  }, a;
}, micro = (f, t) => {
  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    let { recStart: n, recStop: r, recRecord: l } = jsRecorder(function(a) {
      f(a);
    }, () => {
      t({ type: "1", val: "获取麦克权限成功" });
    }, () => {
      t({ type: "0", val: "获取麦克权限失败" });
    });
    return {
      recStart: n,
      recStop: r,
      recRecord: l
    };
  } else
    t({ type: "0", val: "环境不支持！" });
};
function asrPlayer({ host: f, _projectId: t, token: n, cb: r }) {
  if (!t || !n) {
    r({ type: "error", value: "参数缺失" });
    return;
  }
  let l = null, a = !1;
  const { recStart: e, recStop: g, recRecord: _ } = micro(function(A) {
    try {
      (l == null ? void 0 : l.readyState) == 1 && l.send(A);
    } catch (I) {
      console.log(I);
    }
  }, function(A) {
    A.type == "1" && r(A);
  }) || {};
  return {
    asrStart: () => {
      if (e) {
        if (a)
          return r({ type: "0", val: "请先stop" });
        a = !0, e(), l = websocketInit(f, t, n, (A) => {
          r(A);
        });
      }
    },
    asrStop: () => {
      if (g) {
        if (!a)
          return r({ type: "0", val: "请误重复stop" });
        a = !1, l.send(JSON.stringify({ signal: "end" })), g();
      }
    },
    asrSignStart: () => {
      l.send(JSON.stringify({ signal: "start" }));
    },
    asrSignEnd: () => {
      l.send(JSON.stringify({ signal: "end" }));
    },
    asrDestroy: () => {
      l && l.close(), l = null, console.log("ws 关闭");
    }
  };
}
class Emitter {
  on(t, n, r) {
    const l = this.e || (this.e = {});
    return (l[t] || (l[t] = [])).push({ fn: n, ctx: r }), this;
  }
  once(t, n, r) {
    const l = this;
    function a(...e) {
      l.off(t, a), n.apply(r, e);
    }
    return a._ = n, this.on(t, a, r);
  }
  emit(t, ...n) {
    const r = ((this.e || (this.e = {}))[t] || []).slice();
    for (let l = 0; l < r.length; l += 1)
      r[l].fn.apply(r[l].ctx, n);
    return this;
  }
  off(t, n) {
    const r = this.e || (this.e = {}), l = r[t], a = [];
    if (l && n)
      for (let e = 0, g = l.length; e < g; e += 1)
        l[e].fn !== n && l[e].fn._ !== n && a.push(l[e]);
    return a.length ? r[t] = a : delete r[t], this;
  }
}
function getNowTime() {
  return performance && typeof performance.now == "function" ? performance.now() : Date.now();
}
const PCMPlayer = function() {
  function f(t) {
    this.init(t);
  }
  return f.prototype.init = function(t) {
    var n = {
      encoding: "16bitInt",
      channels: 1,
      sampleRate: 16e3,
      flushingTime: 240
    };
    this.option = Object.assign({}, n, t), this.samples = new Float32Array(), this.flush = this.flush.bind(this), this.interval = setInterval(this.flush, this.option.flushingTime), this.maxValue = this.getMaxValue(), this.typedArray = this.getTypedArray(), this.createContext();
  }, f.prototype.getMaxValue = function() {
    var t = {
      "8bitInt": 128,
      "16bitInt": 32768,
      "32bitInt": 2147483648,
      "32bitFloat": 1
    };
    return t[this.option.encoding] ? t[this.option.encoding] : t["16bitInt"];
  }, f.prototype.getTypedArray = function() {
    var t = {
      "8bitInt": Int8Array,
      "16bitInt": Int16Array,
      "32bitInt": Int32Array,
      "32bitFloat": Float32Array
    };
    return t[this.option.encoding] ? t[this.option.encoding] : t["16bitInt"];
  }, f.prototype.createContext = function() {
    this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(), this.gainNode = this.audioCtx.createGain(), this.gainNode.gain.value = 1, this.gainNode.connect(this.audioCtx.destination), this.startTime = this.audioCtx.currentTime;
  }, f.prototype.isTypedArray = function(t) {
    return t.byteLength && t.buffer && t.buffer.constructor == ArrayBuffer;
  }, f.prototype.feed = function(t) {
    if (this.isTypedArray(t)) {
      t = this.getFormatedValue(t);
      var n = new Float32Array(this.samples.length + t.length);
      n.set(this.samples, 0), n.set(t, this.samples.length), this.samples = n;
    }
  }, f.prototype.getFormatedValue = function(n) {
    var n = new this.typedArray(n.buffer), r = new Float32Array(n.length), l;
    for (l = 0; l < n.length; l++)
      r[l] = n[l] / this.maxValue;
    return r;
  }, f.prototype.volume = function(t) {
    this.gainNode.gain.value = t;
  }, f.prototype.destroy = function() {
    this.interval && clearInterval(this.interval), this.samples = null, this.audioCtx.close(), this.audioCtx = null;
  }, f.prototype.flush = function() {
    if (this.samples.length) {
      var t = this.audioCtx.createBufferSource(), n = this.samples.length / this.option.channels, r = this.audioCtx.createBuffer(this.option.channels, n, this.option.sampleRate), l, a, e, g, _;
      for (a = 0; a < this.option.channels; a++)
        for (l = r.getChannelData(a), e = a, _ = 50, g = 0; g < n; g++)
          l[g] = this.samples[e], g < 50 && (l[g] = l[g] * g / 50), g >= n - 51 && (l[g] = l[g] * _-- / 50), e += this.option.channels;
      this.startTime < this.audioCtx.currentTime && (this.startTime = this.audioCtx.currentTime), t.buffer = r, t.connect(this.gainNode), t.start(this.startTime), this.startTime += r.duration, this.samples = new Float32Array();
    }
  }, f.prototype.getTimestamp = function() {
    return this.audioCtx ? this.audioCtx.currentTime : 0;
  }, f.prototype.play = function(t) {
    if (this.isTypedArray(t) && (t = this.getFormatedValue(t), !!t.length)) {
      var n = this.audioCtx.createBufferSource(), r = t.length / this.option.channels, l = this.audioCtx.createBuffer(this.option.channels, r, this.option.sampleRate), a, e, g, _, y;
      for (e = 0; e < this.option.channels; e++)
        for (a = l.getChannelData(e), g = e, y = 50, _ = 0; _ < r; _++)
          a[_] = t[g], _ < 50 && (a[_] = a[_] * _ / 50), _ >= r - 51 && (a[_] = a[_] * y-- / 50), g += this.option.channels;
      this.startTime < this.audioCtx.currentTime && (this.startTime = this.audioCtx.currentTime), n.buffer = l, n.connect(this.gainNode), n.start(this.startTime), n.onended = () => {
        this.option.endCallback();
      }, this.startTime += l.duration;
    }
  }, f.prototype.pause = function() {
    this.audioCtx.state === "running" && this.audioCtx.suspend();
  }, f.prototype.resume = function() {
    this.audioCtx.state === "suspended" && this.audioCtx.resume();
  }, f;
}();
class AudioPlayer {
  constructor(t) {
    const { flv: n } = t;
    this.playing = !1, this.audioPts = [], this.outAudioIndex = 0, this.inputAudioIndex = 0, this.volume = n.options.volume, this.audioCtrl = new PCMPlayer({
      encoding: "16bitInt",
      channels: 1,
      sampleRate: 16e3,
      endCallback: () => {
        this.playing = !1;
      }
    }), this.audioCtrl.volume(this.volume), n.on("audioData", (r, l) => {
      this.outAudioIndex++, this.audioCtrl.feed(r), this.audioPts.push({
        pts: l
        // buffer: buffer
      });
    }), n.on("destroy", () => {
      this.audioPts = [], this.audioCtrl.destroy();
    }), n.on("timeupdate", (r) => {
      const l = this.audioPts[0].pts;
      l && r > l && this.feed(0);
    });
  }
  get decoding() {
    return this.outAudioIndex !== this.inputAudioIndex;
  }
  get framePlay() {
    return this.audioPts.length > 0 && this.playing;
  }
  get getTimestamp() {
    var t;
    return (t = this.audioCtrl) == null ? void 0 : t.getTimestamp();
  }
  feed(t) {
    if (this.inputAudioIndex++, !this.audioPts[t])
      return !1;
    this.audioPts.shift();
  }
  play() {
    this.audioPts.length > 0 ? (this.playing = !0, this.audioCtrl.resume()) : this.playing = !1;
  }
  reset() {
    this.playing = !1, this.audioCtrl.destroy(), this.audioCtrl = new PCMPlayer({
      encoding: "16bitInt",
      channels: 1,
      sampleRate: 16e3,
      endCallback: () => {
        this.playing = !1;
      }
    }), this.audioCtrl.volume(this.volume), this.audioPts = [], this.outAudioIndex = 0, this.inputAudioIndex = 0;
  }
  stop() {
    this.playing = !1, this.audioCtrl.pause();
  }
  resume() {
    this.playing = !0, this.audioCtrl.resume();
  }
}
class Play {
  constructor(t) {
    this.flv = t, this.streaming = !1, this.ended = !0, this.animationFrameTimer = null, this.audioDecoder = new AudioPlayer(this), this.sign = 0, this.resultSign = 0, this.playerStatus = "", this.currentTime = 0, this.lastUpdateTime = 0, t.on("destroy", () => {
      this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.animationFrameTimer && cancelAnimationFrame(this.animationFrameTimer), this.animationFrameTimer = null, this.ended = !0;
    }), t.on("streaming", () => {
      this.streaming = !0;
    }), t.on("streamEnd", () => {
      this.streaming = !1, this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null;
    });
  }
  init() {
    this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.currentTime = 0, this.lastUpdateTime = 0, this.animationFrame(), this.ended = !1;
  }
  animationFrame() {
    this.animationFrameTimer = requestAnimationFrame(() => {
      if (this.audioDecoder.framePlay) {
        this.flv.stearmPtsH || (this.flv.stearmPtsH = !0, this.currentTime = 0, this.flv.options.canPlay());
        const t = getNowTime();
        this.currentTime += t - this.lastUpdateTime, this.lastUpdateTime = t, this.flv.emit("timeupdate", this.currentTime);
      } else if (this.streaming || this.audioDecoder.decoding) {
        this.audioDecoder.stop(), this.waitingTimer = setTimeout(() => {
          this.lastUpdateTime = getNowTime(), this.play(), this.audioDecoder.framePlay ? this.playerStatus != "canplay" && (this.playerStatus = "canplay", this.flv.options.canPlay(), this.flv.stearmPtsH = !0) : this.playerStatus != "waiting" && (this.playerStatus = "waiting", this.flv.options.waiting());
        }, 200);
        return;
      }
      this.animationFrame();
    });
  }
  play() {
    this.audioDecoder.play(), this.animationFrame();
  }
  restart() {
    this.audioDecoder.reset(), this.currentTime = 0, this.lastUpdateTime = 0, this.playerStatus = "";
  }
  continue() {
    this.lastUpdateTime = getNowTime(), this.audioDecoder.resume(), this.animationFrame();
  }
  stop() {
    this.audioDecoder.stop(), this.waitingTimer && clearTimeout(this.waitingTimer), this.waitingTimer = null, this.animationFrameTimer && cancelAnimationFrame(this.animationFrameTimer), this.animationFrameTimer = null;
  }
}
class flvStearmLoad extends Emitter {
  constructor(t) {
    super(), this.options = Object.assign({
      url: "",
      volume: 1,
      ...t
    }), this.audioTimestamp = 0, this.init(), this.stearmPtsH = !1;
  }
  init() {
    this.options.webcodeDisabled && (window.VideoDecoder = !1), this.player = new Play(this), this.stearmInit(), this.player.init(), this.audioTimestamp = 0;
  }
  stearmInit() {
    const t = this;
    this.socket = new WebSocket(this.options.url), this.socket.binaryType = "arraybuffer", this.socket.onopen = () => {
      t.options.cbOpen(t.socket), t.emit("streamStart");
    }, this.socket.onmessage = (n) => {
      t.options.cbMessage(t.socket, n, function(r, l) {
        if (r.byteLength == 1) {
          t.options.wxServerEnd();
          return;
        }
        t.emit("streaming"), r[0] === 80 && r[1] === 67 && r[2] === 77 && (t.audioTimestamp += 40, t.emit("audioData", r.slice(3), t.audioTimestamp));
      });
    }, this.socket.onerror = (n) => {
      throw t.options.cbError(t.socket, n), t.emit("streamError", n), n;
    }, this.socket.onclose = () => {
      this.stearmPtsH = !1, t.options.cbClose(t.socket), t.emit("streamEnd");
    }, console.log(this.options.url);
  }
  destroy() {
    this.emit("destroy");
  }
  restart() {
    console.error("restart"), this.audioTimestamp = 0, this.stearmPtsH = !1, this.player.restart();
  }
  changeVolume(t) {
    t ? this.player.audioDecoder.audioCtrl.volume(0) : this.player.audioDecoder.audioCtrl.volume(this.options.volume);
  }
}
const isPlat = judgeEnvironment().includes("Chrome");
let cartoonPlayer = null, pacemaker = !1, websocket = null, videoPlayerInit = !1, interval = 5, screenCanvas = null, avatarVideo = null, silentVideo = null, videoWidth = "", videoHeight = "", reqRes = null, emitter = new Emitter$2();
const checkCondition = (f) => {
  "WebSocket" in window ? f(!0, "success") : f(!1, "当前浏览器不支持websocketio连接");
}, webReconnect = (f = !1) => {
  videoPlayerInit = !0, cartoonPlayer.restart();
}, loopConnect = () => {
  uninstallEvent(!1), startPlayer();
}, pageAcitveStatusGet = () => {
  (() => {
    setTimeout(() => {
      interval += 5, interval > 30 && (interval = 30), loopConnect();
    }, interval * 1e3);
  })();
}, uninstallEvent = (f = !0) => {
  pacemaker = f, videoPlayerInit = !1, heartPing.end(), cartoonPlayer && (cartoonPlayer == null || cartoonPlayer.destroy(), cartoonPlayer = null), websocket && (websocket.close(), websocket = null);
};
let asrWsApp = null;
const startPlayer = () => {
  let { _sign: f, _projectId: t, _drivertype: n, _volume: r, _asr: l } = commonObj;
  cartoonPlayer = new flvStearmLoad({
    url: websocketInit$1({ _projectId: t, _sign: f, isPlat, type: 0, _drivertype: n, requestVideo }),
    volume: r,
    cbOpen: function(a) {
      console.error("建立websocket", a), websocket = a, l && asrWsApp && asrWsApp(a), heartPing.start(() => {
        (websocket == null ? void 0 : websocket.readyState) == 1 && (websocket == null || websocket.send(JSON.stringify({ signal: "ping" })));
      });
    },
    cbMessage: isPlat ? function(a, e, g) {
      if (typeof e.data == "object") {
        const _ = new Uint8Array(e.data);
        _[0] !== 72 || _[1] !== 80 || _[2] !== 67 || _[3] !== 77 || (videoPlayerInit = !1, console.log("——————————loop new——————————————")), g(_, videoPlayerInit);
      } else if (e.data != "ppg-end") {
        if (e.data.includes("requests overload"))
          pacemaker = !0, emitter.emit("wsMessage", {
            type: "requests overload"
          });
        else if (e.data.includes("{")) {
          const _ = JSON.parse(e.data);
          _.type == "asr-part" || _.type == "asr" || _.type == "answer" ? emitter.emit("wsMessage", _) : _.type == "startAsr" || _.type == "startSleep" || _.type == "wakeup" || (_.type == "server_ready" ? (console.error("可以发送语音文件"), emitter.emit("wsMessage", _)) : _.type == "server_ended" || _.type == "error" && emitter.emit("wsMessage", _));
        }
      }
    } : function(a, e, g) {
      const _ = new Uint8Array(e.data);
      if (_[0] === 116 && _[1] === 101 && _[2] === 120 && _[3] === 116) {
        const y = get_text$1(_);
        if (console.log(y, "string"), y != "ppg-end") {
          if (y != "pong") {
            if (y.includes("requests overload"))
              pacemaker = !0, emitter.emit("wsMessage", {
                type: "requests overload"
              });
            else if (y.includes("{")) {
              const x = JSON.parse(y);
              x.type == "asr-part" || x.type == "asr" || x.type == "answer" ? emitter.emit("wsMessage", x) : x.type == "startAsr" || x.type == "startSleep" || x.type == "wakeup" || (x.type == "server_ready" ? (console.error("可以发送语音文件"), emitter.emit("wsMessage", x)) : x.type == "server_ended" || x.type == "error" && emitter.emit("wsMessage", x));
            }
          }
        }
      } else
        _[0] !== 72 || _[1] !== 80 || _[2] !== 67 || _[3] !== 77 || (videoPlayerInit = !1, console.log("——————————loop new——————————————")), g(_, videoPlayerInit);
    },
    cbError: function(a, e) {
      console.error("websocket错误：", e), pacemaker = !0, heartPing.end();
    },
    cbClose: function(a) {
      console.error("websocket关闭！"), pacemaker || pageAcitveStatusGet();
    },
    // 播放器
    wxServerEnd: function() {
    },
    canPlay: function() {
      webglCut.videoPlay(), emitter.emit("videoStart"), this.streamImg = !0;
    },
    waiting: function() {
      webglCut.slicePlay(), emitter.emit("videoEnd"), this.streamImg = !1, websocket == null || websocket.send(SendMsg.startAsr());
    }
  });
};
function displayEle(f, t) {
  f.style.display = t;
}
let requestVideo = "";
function player(f, t, n, r, l, a = 1) {
  videoWidth = viewMap[t][l].width, videoHeight = viewMap[t][l].height, requestVideo = `requestWidth=${videoWidth}&requestHeight=${videoHeight}`, document.querySelector(f).innerHTML = `
      <canvas id="screenPlayer" style="zoom:${a};" width="${videoWidth}" height="${videoHeight}"></canvas>
      <video id="avatarVideo" width="${videoWidth}" height="${videoHeight}" src="${r}" muted loop autoplay hidden webkit-playsinline="true" playsinline="true" crossorigin="anonymous"></video>
      <video id="silentVideo" width="${videoWidth}" height="${videoHeight}" src="${n}" muted loop autoplay hidden webkit-playsinline="true" playsinline="true" crossorigin="anonymous"></video>`, screenCanvas = querySelectorEl("#screenPlayer"), avatarVideo = querySelectorEl("#avatarVideo"), silentVideo = querySelectorEl("#silentVideo"), displayEle(silentVideo, "none"), displayEle(avatarVideo, "none");
}
class xxPlayer extends Emitter$2 {
  constructor({ environment: t, containerLable: n, token: r, projectId: l, quality: a, zoom: e, clientId: g, volume: _, asr: y }, x) {
    if (super(), y) {
      const { asrDestroy: E, asrWsAppoint: C, asrStart: L } = asrWs((A) => {
        console.log(A, "mic");
      });
      asrWsApp = C, L();
    }
    emitter = new Emitter$2(), this.containerLable = n, commonObj._sign = r, commonObj._projectId = l, this.quality = a || 1, this.zoom = e || 1, commonObj._env = t || "prd", commonObj._volume = _ || 1, commonObj._asr = y || !1, reqRes = x, this.streamImg = !1;
  }
  init() {
    checkCondition((t) => {
      if (t) {
        let { avatarSilenceUrl: n, avatarDirection: r, avatarChatUrl: l } = reqRes.data;
        player(this.containerLable, r, n, l, this.quality, this.zoom), emitter.on("videoEnd", () => {
          this.emit("message", { type: "videoEnd", data: {} });
        }), emitter.on("videoStart", () => {
          this.emit("message", { type: "videoStart", data: {} });
        }), emitter.on("wsMessage", (a) => {
          this.emit("message", { type: "wsMessage", data: a });
        }), emitter.on("initCartoon", () => {
          this.emit("intialSucccess", { type: "2" });
        }), this.emit("intialSucccess", { type: "1" });
      } else
        this.emit("intialError", msg);
    });
  }
  playSilentvideo() {
    silentVideo && silentVideo.play().then((t) => {
      console.log("ffm交互静音视频播放");
    }).catch((t) => {
      console.log("ffm交互静音视频播放失败-", t);
    }), avatarVideo && avatarVideo.play().then((t) => {
      console.log("ffm交互静音视频播放");
    }).catch((t) => {
      console.log("ffm交互静音视频播放失败-", t);
    });
  }
  startPlay() {
    webglCut.load(avatarVideo, silentVideo, screenCanvas, (t) => {
      videoPlayerInit = !0, webglCut.slicePlay(), startPlayer(this.direction, this.quality), emitter.emit("initCartoon");
    }, isPlat ? "fragment-shader-nocut" : "");
  }
  setClientId(t) {
    t ? commonObj._clientId = t : console.log("clientId不能为空");
  }
  stopPlay() {
    uninstallEvent(), emitter = null, screenCanvas = null, avatarVideo = null, silentVideo = null, videoWidth = "", videoHeight = "", reqRes = null, asrWsApp = null, this.streamImg = !1;
  }
  //api
  playQA(t, n) {
    this.streamImg = !0, webglCut.slicePlay(), webReconnect(), websocket == null || websocket.send(SendMsg.qa(t, n));
  }
  interrupt() {
    websocket == null || websocket.send(SendMsg.interrupt()), webglCut.slicePlay(), webReconnect(!0), this.streamImg = !1;
  }
  playText(t) {
    websocket == null || websocket.send(SendMsg.text(t));
  }
  playStreamText(t) {
    websocket == null || websocket.send(SendMsg.streamText(t));
  }
  playStreamTextStart(t, n) {
    websocket == null || websocket.send(SendMsg.streamTextStart(t, n)), this.streamImg = !0;
  }
  playStreamTextEnd() {
    websocket == null || websocket.send(SendMsg.streamTextEnd());
  }
  playAudio(t) {
    websocket == null || websocket.send(SendMsg.streamAudio(t)), this.streamImg = !0;
  }
  playAudioEnd() {
    websocket == null || websocket.send(SendMsg.streamAudioEnd());
  }
  playCurVideo() {
    this.streamImg && (websocket == null || websocket.send(SendMsg.resumePlay()), webglCut.videoPlay(), cartoonPlayer.player.continue());
  }
  stopCurVideo() {
    this.streamImg && (websocket == null || websocket.send(SendMsg.pausePlay()), cartoonPlayer.player.stop(), webglCut.slicePlay());
  }
}
var vconsole_min = { exports: {} };
/*!
 * vConsole v3.15.1 (https://github.com/Tencent/vConsole)
 *
 * Tencent is pleased to support the open source community by making vConsole available.
 * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 */
(function(module, exports) {
  (function(f, t) {
    module.exports = t();
  })(commonjsGlobal || self, function() {
    return function() {
      var __webpack_modules__ = { 4264: function(f, t, n) {
        f.exports = n(7588);
      }, 5036: function(f, t, n) {
        n(1719), n(5677), n(6394), n(5334), n(6969), n(2021), n(8328), n(2129);
        var r = n(1287);
        f.exports = r.Promise;
      }, 2582: function(f, t, n) {
        n(1646), n(6394), n(2004), n(462), n(8407), n(2429), n(1172), n(8288), n(1274), n(8201), n(6626), n(3211), n(9952), n(15), n(9831), n(7521), n(2972), n(6956), n(5222), n(2257);
        var r = n(1287);
        f.exports = r.Symbol;
      }, 8257: function(f, t, n) {
        var r = n(7583), l = n(9212), a = n(5637), e = r.TypeError;
        f.exports = function(g) {
          if (l(g))
            return g;
          throw e(a(g) + " is not a function");
        };
      }, 1186: function(f, t, n) {
        var r = n(7583), l = n(2097), a = n(5637), e = r.TypeError;
        f.exports = function(g) {
          if (l(g))
            return g;
          throw e(a(g) + " is not a constructor");
        };
      }, 9882: function(f, t, n) {
        var r = n(7583), l = n(9212), a = r.String, e = r.TypeError;
        f.exports = function(g) {
          if (typeof g == "object" || l(g))
            return g;
          throw e("Can't set " + a(g) + " as a prototype");
        };
      }, 6288: function(f, t, n) {
        var r = n(3649), l = n(3590), a = n(4615), e = r("unscopables"), g = Array.prototype;
        g[e] == null && a.f(g, e, { configurable: !0, value: l(null) }), f.exports = function(_) {
          g[e][_] = !0;
        };
      }, 4761: function(f, t, n) {
        var r = n(7583), l = n(2447), a = r.TypeError;
        f.exports = function(e, g) {
          if (l(g, e))
            return e;
          throw a("Incorrect invocation");
        };
      }, 2569: function(f, t, n) {
        var r = n(7583), l = n(794), a = r.String, e = r.TypeError;
        f.exports = function(g) {
          if (l(g))
            return g;
          throw e(a(g) + " is not an object");
        };
      }, 5766: function(f, t, n) {
        var r = n(2977), l = n(6782), a = n(1825), e = function(g) {
          return function(_, y, x) {
            var E, C = r(_), L = a(C), A = l(x, L);
            if (g && y != y) {
              for (; L > A; )
                if ((E = C[A++]) != E)
                  return !0;
            } else
              for (; L > A; A++)
                if ((g || A in C) && C[A] === y)
                  return g || A || 0;
            return !g && -1;
          };
        };
        f.exports = { includes: e(!0), indexOf: e(!1) };
      }, 4805: function(f, t, n) {
        var r = n(2938), l = n(7386), a = n(5044), e = n(1324), g = n(1825), _ = n(4822), y = l([].push), x = function(E) {
          var C = E == 1, L = E == 2, A = E == 3, I = E == 4, D = E == 6, w = E == 7, S = E == 5 || D;
          return function(O, F, j, P) {
            for (var $, V, q = e(O), ee = a(q), re = r(F, j), ye = g(ee), ce = 0, Q = P || _, se = C ? Q(O, ye) : L || w ? Q(O, 0) : void 0; ye > ce; ce++)
              if ((S || ce in ee) && (V = re($ = ee[ce], ce, q), E))
                if (C)
                  se[ce] = V;
                else if (V)
                  switch (E) {
                    case 3:
                      return !0;
                    case 5:
                      return $;
                    case 6:
                      return ce;
                    case 2:
                      y(se, $);
                  }
                else
                  switch (E) {
                    case 4:
                      return !1;
                    case 7:
                      y(se, $);
                  }
            return D ? -1 : A || I ? I : se;
          };
        };
        f.exports = { forEach: x(0), map: x(1), filter: x(2), some: x(3), every: x(4), find: x(5), findIndex: x(6), filterReject: x(7) };
      }, 9269: function(f, t, n) {
        var r = n(6544), l = n(3649), a = n(4061), e = l("species");
        f.exports = function(g) {
          return a >= 51 || !r(function() {
            var _ = [];
            return (_.constructor = {})[e] = function() {
              return { foo: 1 };
            }, _[g](Boolean).foo !== 1;
          });
        };
      }, 4546: function(f, t, n) {
        var r = n(7583), l = n(6782), a = n(1825), e = n(5999), g = r.Array, _ = Math.max;
        f.exports = function(y, x, E) {
          for (var C = a(y), L = l(x, C), A = l(E === void 0 ? C : E, C), I = g(_(A - L, 0)), D = 0; L < A; L++, D++)
            e(I, D, y[L]);
          return I.length = D, I;
        };
      }, 6917: function(f, t, n) {
        var r = n(7386);
        f.exports = r([].slice);
      }, 5289: function(f, t, n) {
        var r = n(7583), l = n(4521), a = n(2097), e = n(794), g = n(3649)("species"), _ = r.Array;
        f.exports = function(y) {
          var x;
          return l(y) && (x = y.constructor, (a(x) && (x === _ || l(x.prototype)) || e(x) && (x = x[g]) === null) && (x = void 0)), x === void 0 ? _ : x;
        };
      }, 4822: function(f, t, n) {
        var r = n(5289);
        f.exports = function(l, a) {
          return new (r(l))(a === 0 ? 0 : a);
        };
      }, 3616: function(f, t, n) {
        var r = n(3649)("iterator"), l = !1;
        try {
          var a = 0, e = { next: function() {
            return { done: !!a++ };
          }, return: function() {
            l = !0;
          } };
          e[r] = function() {
            return this;
          }, Array.from(e, function() {
            throw 2;
          });
        } catch {
        }
        f.exports = function(g, _) {
          if (!_ && !l)
            return !1;
          var y = !1;
          try {
            var x = {};
            x[r] = function() {
              return { next: function() {
                return { done: y = !0 };
              } };
            }, g(x);
          } catch {
          }
          return y;
        };
      }, 9624: function(f, t, n) {
        var r = n(7386), l = r({}.toString), a = r("".slice);
        f.exports = function(e) {
          return a(l(e), 8, -1);
        };
      }, 3058: function(f, t, n) {
        var r = n(7583), l = n(8191), a = n(9212), e = n(9624), g = n(3649)("toStringTag"), _ = r.Object, y = e(function() {
          return arguments;
        }()) == "Arguments";
        f.exports = l ? e : function(x) {
          var E, C, L;
          return x === void 0 ? "Undefined" : x === null ? "Null" : typeof (C = function(A, I) {
            try {
              return A[I];
            } catch {
            }
          }(E = _(x), g)) == "string" ? C : y ? e(E) : (L = e(E)) == "Object" && a(E.callee) ? "Arguments" : L;
        };
      }, 1509: function(f, t, n) {
        var r = n(7386)("".replace), l = String(Error("zxcasd").stack), a = /\n\s*at [^:]*:[^\n]*/, e = a.test(l);
        f.exports = function(g, _) {
          if (e && typeof g == "string")
            for (; _--; )
              g = r(g, a, "");
          return g;
        };
      }, 3478: function(f, t, n) {
        var r = n(2870), l = n(929), a = n(6683), e = n(4615);
        f.exports = function(g, _, y) {
          for (var x = l(_), E = e.f, C = a.f, L = 0; L < x.length; L++) {
            var A = x[L];
            r(g, A) || y && r(y, A) || E(g, A, C(_, A));
          }
        };
      }, 926: function(f, t, n) {
        var r = n(6544);
        f.exports = !r(function() {
          function l() {
          }
          return l.prototype.constructor = null, Object.getPrototypeOf(new l()) !== l.prototype;
        });
      }, 4683: function(f, t, n) {
        var r = n(2365).IteratorPrototype, l = n(3590), a = n(4677), e = n(8821), g = n(339), _ = function() {
          return this;
        };
        f.exports = function(y, x, E, C) {
          var L = x + " Iterator";
          return y.prototype = l(r, { next: a(+!C, E) }), e(y, L, !1, !0), g[L] = _, y;
        };
      }, 57: function(f, t, n) {
        var r = n(8494), l = n(4615), a = n(4677);
        f.exports = r ? function(e, g, _) {
          return l.f(e, g, a(1, _));
        } : function(e, g, _) {
          return e[g] = _, e;
        };
      }, 4677: function(f) {
        f.exports = function(t, n) {
          return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: n };
        };
      }, 5999: function(f, t, n) {
        var r = n(8734), l = n(4615), a = n(4677);
        f.exports = function(e, g, _) {
          var y = r(g);
          y in e ? l.f(e, y, a(0, _)) : e[y] = _;
        };
      }, 9012: function(f, t, n) {
        var r = n(7263), l = n(8262), a = n(6268), e = n(4340), g = n(9212), _ = n(4683), y = n(729), x = n(7496), E = n(8821), C = n(57), L = n(1270), A = n(3649), I = n(339), D = n(2365), w = e.PROPER, S = e.CONFIGURABLE, O = D.IteratorPrototype, F = D.BUGGY_SAFARI_ITERATORS, j = A("iterator"), P = "keys", $ = "values", V = "entries", q = function() {
          return this;
        };
        f.exports = function(ee, re, ye, ce, Q, se, fe) {
          _(ye, re, ce);
          var G, K, de, ve = function(Oe) {
            if (Oe === Q && ne)
              return ne;
            if (!F && Oe in U)
              return U[Oe];
            switch (Oe) {
              case P:
              case $:
              case V:
                return function() {
                  return new ye(this, Oe);
                };
            }
            return function() {
              return new ye(this);
            };
          }, ae = re + " Iterator", J = !1, U = ee.prototype, X = U[j] || U["@@iterator"] || Q && U[Q], ne = !F && X || ve(Q), we = re == "Array" && U.entries || X;
          if (we && (G = y(we.call(new ee()))) !== Object.prototype && G.next && (a || y(G) === O || (x ? x(G, O) : g(G[j]) || L(G, j, q)), E(G, ae, !0, !0), a && (I[ae] = q)), w && Q == $ && X && X.name !== $ && (!a && S ? C(U, "name", $) : (J = !0, ne = function() {
            return l(X, this);
          })), Q)
            if (K = { values: ve($), keys: se ? ne : ve(P), entries: ve(V) }, fe)
              for (de in K)
                (F || J || !(de in U)) && L(U, de, K[de]);
            else
              r({ target: re, proto: !0, forced: F || J }, K);
          return a && !fe || U[j] === ne || L(U, j, ne, { name: Q }), I[re] = ne, K;
        };
      }, 2219: function(f, t, n) {
        var r = n(1287), l = n(2870), a = n(491), e = n(4615).f;
        f.exports = function(g) {
          var _ = r.Symbol || (r.Symbol = {});
          l(_, g) || e(_, g, { value: a.f(g) });
        };
      }, 8494: function(f, t, n) {
        var r = n(6544);
        f.exports = !r(function() {
          return Object.defineProperty({}, 1, { get: function() {
            return 7;
          } })[1] != 7;
        });
      }, 6668: function(f, t, n) {
        var r = n(7583), l = n(794), a = r.document, e = l(a) && l(a.createElement);
        f.exports = function(g) {
          return e ? a.createElement(g) : {};
        };
      }, 6778: function(f) {
        f.exports = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 };
      }, 9307: function(f, t, n) {
        var r = n(6668)("span").classList, l = r && r.constructor && r.constructor.prototype;
        f.exports = l === Object.prototype ? void 0 : l;
      }, 2274: function(f) {
        f.exports = typeof window == "object";
      }, 3256: function(f, t, n) {
        var r = n(6918), l = n(7583);
        f.exports = /ipad|iphone|ipod/i.test(r) && l.Pebble !== void 0;
      }, 7020: function(f, t, n) {
        var r = n(6918);
        f.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(r);
      }, 5354: function(f, t, n) {
        var r = n(9624), l = n(7583);
        f.exports = r(l.process) == "process";
      }, 6846: function(f, t, n) {
        var r = n(6918);
        f.exports = /web0s(?!.*chrome)/i.test(r);
      }, 6918: function(f, t, n) {
        var r = n(5897);
        f.exports = r("navigator", "userAgent") || "";
      }, 4061: function(f, t, n) {
        var r, l, a = n(7583), e = n(6918), g = a.process, _ = a.Deno, y = g && g.versions || _ && _.version, x = y && y.v8;
        x && (l = (r = x.split("."))[0] > 0 && r[0] < 4 ? 1 : +(r[0] + r[1])), !l && e && (!(r = e.match(/Edge\/(\d+)/)) || r[1] >= 74) && (r = e.match(/Chrome\/(\d+)/)) && (l = +r[1]), f.exports = l;
      }, 5690: function(f) {
        f.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
      }, 1178: function(f, t, n) {
        var r = n(6544), l = n(4677);
        f.exports = !r(function() {
          var a = Error("a");
          return !("stack" in a) || (Object.defineProperty(a, "stack", l(1, 7)), a.stack !== 7);
        });
      }, 7263: function(f, t, n) {
        var r = n(7583), l = n(6683).f, a = n(57), e = n(1270), g = n(460), _ = n(3478), y = n(4451);
        f.exports = function(x, E) {
          var C, L, A, I, D, w = x.target, S = x.global, O = x.stat;
          if (C = S ? r : O ? r[w] || g(w, {}) : (r[w] || {}).prototype)
            for (L in E) {
              if (I = E[L], A = x.noTargetGet ? (D = l(C, L)) && D.value : C[L], !y(S ? L : w + (O ? "." : "#") + L, x.forced) && A !== void 0) {
                if (typeof I == typeof A)
                  continue;
                _(I, A);
              }
              (x.sham || A && A.sham) && a(I, "sham", !0), e(C, L, I, x);
            }
        };
      }, 6544: function(f) {
        f.exports = function(t) {
          try {
            return !!t();
          } catch {
            return !0;
          }
        };
      }, 1611: function(f, t, n) {
        var r = n(8987), l = Function.prototype, a = l.apply, e = l.call;
        f.exports = typeof Reflect == "object" && Reflect.apply || (r ? e.bind(a) : function() {
          return e.apply(a, arguments);
        });
      }, 2938: function(f, t, n) {
        var r = n(7386), l = n(8257), a = n(8987), e = r(r.bind);
        f.exports = function(g, _) {
          return l(g), _ === void 0 ? g : a ? e(g, _) : function() {
            return g.apply(_, arguments);
          };
        };
      }, 8987: function(f, t, n) {
        var r = n(6544);
        f.exports = !r(function() {
          var l = (function() {
          }).bind();
          return typeof l != "function" || l.hasOwnProperty("prototype");
        });
      }, 8262: function(f, t, n) {
        var r = n(8987), l = Function.prototype.call;
        f.exports = r ? l.bind(l) : function() {
          return l.apply(l, arguments);
        };
      }, 4340: function(f, t, n) {
        var r = n(8494), l = n(2870), a = Function.prototype, e = r && Object.getOwnPropertyDescriptor, g = l(a, "name"), _ = g && (function() {
        }).name === "something", y = g && (!r || r && e(a, "name").configurable);
        f.exports = { EXISTS: g, PROPER: _, CONFIGURABLE: y };
      }, 7386: function(f, t, n) {
        var r = n(8987), l = Function.prototype, a = l.bind, e = l.call, g = r && a.bind(e, e);
        f.exports = r ? function(_) {
          return _ && g(_);
        } : function(_) {
          return _ && function() {
            return e.apply(_, arguments);
          };
        };
      }, 5897: function(f, t, n) {
        var r = n(7583), l = n(9212), a = function(e) {
          return l(e) ? e : void 0;
        };
        f.exports = function(e, g) {
          return arguments.length < 2 ? a(r[e]) : r[e] && r[e][g];
        };
      }, 8272: function(f, t, n) {
        var r = n(3058), l = n(911), a = n(339), e = n(3649)("iterator");
        f.exports = function(g) {
          if (g != null)
            return l(g, e) || l(g, "@@iterator") || a[r(g)];
        };
      }, 6307: function(f, t, n) {
        var r = n(7583), l = n(8262), a = n(8257), e = n(2569), g = n(5637), _ = n(8272), y = r.TypeError;
        f.exports = function(x, E) {
          var C = arguments.length < 2 ? _(x) : E;
          if (a(C))
            return e(l(C, x));
          throw y(g(x) + " is not iterable");
        };
      }, 911: function(f, t, n) {
        var r = n(8257);
        f.exports = function(l, a) {
          var e = l[a];
          return e == null ? void 0 : r(e);
        };
      }, 7583: function(f, t, n) {
        var r = function(l) {
          return l && l.Math == Math && l;
        };
        f.exports = r(typeof globalThis == "object" && globalThis) || r(typeof window == "object" && window) || r(typeof self == "object" && self) || r(typeof n.g == "object" && n.g) || function() {
          return this;
        }() || Function("return this")();
      }, 2870: function(f, t, n) {
        var r = n(7386), l = n(1324), a = r({}.hasOwnProperty);
        f.exports = Object.hasOwn || function(e, g) {
          return a(l(e), g);
        };
      }, 4639: function(f) {
        f.exports = {};
      }, 2716: function(f, t, n) {
        var r = n(7583);
        f.exports = function(l, a) {
          var e = r.console;
          e && e.error && (arguments.length == 1 ? e.error(l) : e.error(l, a));
        };
      }, 482: function(f, t, n) {
        var r = n(5897);
        f.exports = r("document", "documentElement");
      }, 275: function(f, t, n) {
        var r = n(8494), l = n(6544), a = n(6668);
        f.exports = !r && !l(function() {
          return Object.defineProperty(a("div"), "a", { get: function() {
            return 7;
          } }).a != 7;
        });
      }, 5044: function(f, t, n) {
        var r = n(7583), l = n(7386), a = n(6544), e = n(9624), g = r.Object, _ = l("".split);
        f.exports = a(function() {
          return !g("z").propertyIsEnumerable(0);
        }) ? function(y) {
          return e(y) == "String" ? _(y, "") : g(y);
        } : g;
      }, 9734: function(f, t, n) {
        var r = n(7386), l = n(9212), a = n(1314), e = r(Function.toString);
        l(a.inspectSource) || (a.inspectSource = function(g) {
          return e(g);
        }), f.exports = a.inspectSource;
      }, 4402: function(f, t, n) {
        var r = n(794), l = n(57);
        f.exports = function(a, e) {
          r(e) && "cause" in e && l(a, "cause", e.cause);
        };
      }, 2743: function(f, t, n) {
        var r, l, a, e = n(9491), g = n(7583), _ = n(7386), y = n(794), x = n(57), E = n(2870), C = n(1314), L = n(9137), A = n(4639), I = "Object already initialized", D = g.TypeError, w = g.WeakMap;
        if (e || C.state) {
          var S = C.state || (C.state = new w()), O = _(S.get), F = _(S.has), j = _(S.set);
          r = function($, V) {
            if (F(S, $))
              throw new D(I);
            return V.facade = $, j(S, $, V), V;
          }, l = function($) {
            return O(S, $) || {};
          }, a = function($) {
            return F(S, $);
          };
        } else {
          var P = L("state");
          A[P] = !0, r = function($, V) {
            if (E($, P))
              throw new D(I);
            return V.facade = $, x($, P, V), V;
          }, l = function($) {
            return E($, P) ? $[P] : {};
          }, a = function($) {
            return E($, P);
          };
        }
        f.exports = { set: r, get: l, has: a, enforce: function($) {
          return a($) ? l($) : r($, {});
        }, getterFor: function($) {
          return function(V) {
            var q;
            if (!y(V) || (q = l(V)).type !== $)
              throw D("Incompatible receiver, " + $ + " required");
            return q;
          };
        } };
      }, 114: function(f, t, n) {
        var r = n(3649), l = n(339), a = r("iterator"), e = Array.prototype;
        f.exports = function(g) {
          return g !== void 0 && (l.Array === g || e[a] === g);
        };
      }, 4521: function(f, t, n) {
        var r = n(9624);
        f.exports = Array.isArray || function(l) {
          return r(l) == "Array";
        };
      }, 9212: function(f) {
        f.exports = function(t) {
          return typeof t == "function";
        };
      }, 2097: function(f, t, n) {
        var r = n(7386), l = n(6544), a = n(9212), e = n(3058), g = n(5897), _ = n(9734), y = function() {
        }, x = [], E = g("Reflect", "construct"), C = /^\s*(?:class|function)\b/, L = r(C.exec), A = !C.exec(y), I = function(w) {
          if (!a(w))
            return !1;
          try {
            return E(y, x, w), !0;
          } catch {
            return !1;
          }
        }, D = function(w) {
          if (!a(w))
            return !1;
          switch (e(w)) {
            case "AsyncFunction":
            case "GeneratorFunction":
            case "AsyncGeneratorFunction":
              return !1;
          }
          try {
            return A || !!L(C, _(w));
          } catch {
            return !0;
          }
        };
        D.sham = !0, f.exports = !E || l(function() {
          var w;
          return I(I.call) || !I(Object) || !I(function() {
            w = !0;
          }) || w;
        }) ? D : I;
      }, 4451: function(f, t, n) {
        var r = n(6544), l = n(9212), a = /#|\.prototype\./, e = function(E, C) {
          var L = _[g(E)];
          return L == x || L != y && (l(C) ? r(C) : !!C);
        }, g = e.normalize = function(E) {
          return String(E).replace(a, ".").toLowerCase();
        }, _ = e.data = {}, y = e.NATIVE = "N", x = e.POLYFILL = "P";
        f.exports = e;
      }, 794: function(f, t, n) {
        var r = n(9212);
        f.exports = function(l) {
          return typeof l == "object" ? l !== null : r(l);
        };
      }, 6268: function(f) {
        f.exports = !1;
      }, 5871: function(f, t, n) {
        var r = n(7583), l = n(5897), a = n(9212), e = n(2447), g = n(7786), _ = r.Object;
        f.exports = g ? function(y) {
          return typeof y == "symbol";
        } : function(y) {
          var x = l("Symbol");
          return a(x) && e(x.prototype, _(y));
        };
      }, 4026: function(f, t, n) {
        var r = n(7583), l = n(2938), a = n(8262), e = n(2569), g = n(5637), _ = n(114), y = n(1825), x = n(2447), E = n(6307), C = n(8272), L = n(7093), A = r.TypeError, I = function(w, S) {
          this.stopped = w, this.result = S;
        }, D = I.prototype;
        f.exports = function(w, S, O) {
          var F, j, P, $, V, q, ee, re = O && O.that, ye = !(!O || !O.AS_ENTRIES), ce = !(!O || !O.IS_ITERATOR), Q = !(!O || !O.INTERRUPTED), se = l(S, re), fe = function(K) {
            return F && L(F, "normal", K), new I(!0, K);
          }, G = function(K) {
            return ye ? (e(K), Q ? se(K[0], K[1], fe) : se(K[0], K[1])) : Q ? se(K, fe) : se(K);
          };
          if (ce)
            F = w;
          else {
            if (!(j = C(w)))
              throw A(g(w) + " is not iterable");
            if (_(j)) {
              for (P = 0, $ = y(w); $ > P; P++)
                if ((V = G(w[P])) && x(D, V))
                  return V;
              return new I(!1);
            }
            F = E(w, j);
          }
          for (q = F.next; !(ee = a(q, F)).done; ) {
            try {
              V = G(ee.value);
            } catch (K) {
              L(F, "throw", K);
            }
            if (typeof V == "object" && V && x(D, V))
              return V;
          }
          return new I(!1);
        };
      }, 7093: function(f, t, n) {
        var r = n(8262), l = n(2569), a = n(911);
        f.exports = function(e, g, _) {
          var y, x;
          l(e);
          try {
            if (!(y = a(e, "return"))) {
              if (g === "throw")
                throw _;
              return _;
            }
            y = r(y, e);
          } catch (E) {
            x = !0, y = E;
          }
          if (g === "throw")
            throw _;
          if (x)
            throw y;
          return l(y), _;
        };
      }, 2365: function(f, t, n) {
        var r, l, a, e = n(6544), g = n(9212), _ = n(3590), y = n(729), x = n(1270), E = n(3649), C = n(6268), L = E("iterator"), A = !1;
        [].keys && ("next" in (a = [].keys()) ? (l = y(y(a))) !== Object.prototype && (r = l) : A = !0), r == null || e(function() {
          var I = {};
          return r[L].call(I) !== I;
        }) ? r = {} : C && (r = _(r)), g(r[L]) || x(r, L, function() {
          return this;
        }), f.exports = { IteratorPrototype: r, BUGGY_SAFARI_ITERATORS: A };
      }, 339: function(f) {
        f.exports = {};
      }, 1825: function(f, t, n) {
        var r = n(97);
        f.exports = function(l) {
          return r(l.length);
        };
      }, 2095: function(f, t, n) {
        var r, l, a, e, g, _, y, x, E = n(7583), C = n(2938), L = n(6683).f, A = n(8117).set, I = n(7020), D = n(3256), w = n(6846), S = n(5354), O = E.MutationObserver || E.WebKitMutationObserver, F = E.document, j = E.process, P = E.Promise, $ = L(E, "queueMicrotask"), V = $ && $.value;
        V || (r = function() {
          var q, ee;
          for (S && (q = j.domain) && q.exit(); l; ) {
            ee = l.fn, l = l.next;
            try {
              ee();
            } catch (re) {
              throw l ? e() : a = void 0, re;
            }
          }
          a = void 0, q && q.enter();
        }, I || S || w || !O || !F ? !D && P && P.resolve ? ((y = P.resolve(void 0)).constructor = P, x = C(y.then, y), e = function() {
          x(r);
        }) : S ? e = function() {
          j.nextTick(r);
        } : (A = C(A, E), e = function() {
          A(r);
        }) : (g = !0, _ = F.createTextNode(""), new O(r).observe(_, { characterData: !0 }), e = function() {
          _.data = g = !g;
        })), f.exports = V || function(q) {
          var ee = { fn: q, next: void 0 };
          a && (a.next = ee), l || (l = ee, e()), a = ee;
        };
      }, 783: function(f, t, n) {
        var r = n(7583);
        f.exports = r.Promise;
      }, 8640: function(f, t, n) {
        var r = n(4061), l = n(6544);
        f.exports = !!Object.getOwnPropertySymbols && !l(function() {
          var a = Symbol();
          return !String(a) || !(Object(a) instanceof Symbol) || !Symbol.sham && r && r < 41;
        });
      }, 9491: function(f, t, n) {
        var r = n(7583), l = n(9212), a = n(9734), e = r.WeakMap;
        f.exports = l(e) && /native code/.test(a(e));
      }, 5084: function(f, t, n) {
        var r = n(8257), l = function(a) {
          var e, g;
          this.promise = new a(function(_, y) {
            if (e !== void 0 || g !== void 0)
              throw TypeError("Bad Promise constructor");
            e = _, g = y;
          }), this.resolve = r(e), this.reject = r(g);
        };
        f.exports.f = function(a) {
          return new l(a);
        };
      }, 2764: function(f, t, n) {
        var r = n(8320);
        f.exports = function(l, a) {
          return l === void 0 ? arguments.length < 2 ? "" : a : r(l);
        };
      }, 3590: function(f, t, n) {
        var r, l = n(2569), a = n(8728), e = n(5690), g = n(4639), _ = n(482), y = n(6668), x = n(9137), E = x("IE_PROTO"), C = function() {
        }, L = function(D) {
          return "<script>" + D + "<\/script>";
        }, A = function(D) {
          D.write(L("")), D.close();
          var w = D.parentWindow.Object;
          return D = null, w;
        }, I = function() {
          try {
            r = new ActiveXObject("htmlfile");
          } catch {
          }
          var D, w;
          I = typeof document < "u" ? document.domain && r ? A(r) : ((w = y("iframe")).style.display = "none", _.appendChild(w), w.src = "javascript:", (D = w.contentWindow.document).open(), D.write(L("document.F=Object")), D.close(), D.F) : A(r);
          for (var S = e.length; S--; )
            delete I.prototype[e[S]];
          return I();
        };
        g[E] = !0, f.exports = Object.create || function(D, w) {
          var S;
          return D !== null ? (C.prototype = l(D), S = new C(), C.prototype = null, S[E] = D) : S = I(), w === void 0 ? S : a.f(S, w);
        };
      }, 8728: function(f, t, n) {
        var r = n(8494), l = n(7670), a = n(4615), e = n(2569), g = n(2977), _ = n(5432);
        t.f = r && !l ? Object.defineProperties : function(y, x) {
          e(y);
          for (var E, C = g(x), L = _(x), A = L.length, I = 0; A > I; )
            a.f(y, E = L[I++], C[E]);
          return y;
        };
      }, 4615: function(f, t, n) {
        var r = n(7583), l = n(8494), a = n(275), e = n(7670), g = n(2569), _ = n(8734), y = r.TypeError, x = Object.defineProperty, E = Object.getOwnPropertyDescriptor, C = "enumerable", L = "configurable", A = "writable";
        t.f = l ? e ? function(I, D, w) {
          if (g(I), D = _(D), g(w), typeof I == "function" && D === "prototype" && "value" in w && A in w && !w.writable) {
            var S = E(I, D);
            S && S.writable && (I[D] = w.value, w = { configurable: L in w ? w.configurable : S.configurable, enumerable: C in w ? w.enumerable : S.enumerable, writable: !1 });
          }
          return x(I, D, w);
        } : x : function(I, D, w) {
          if (g(I), D = _(D), g(w), a)
            try {
              return x(I, D, w);
            } catch {
            }
          if ("get" in w || "set" in w)
            throw y("Accessors not supported");
          return "value" in w && (I[D] = w.value), I;
        };
      }, 6683: function(f, t, n) {
        var r = n(8494), l = n(8262), a = n(112), e = n(4677), g = n(2977), _ = n(8734), y = n(2870), x = n(275), E = Object.getOwnPropertyDescriptor;
        t.f = r ? E : function(C, L) {
          if (C = g(C), L = _(L), x)
            try {
              return E(C, L);
            } catch {
            }
          if (y(C, L))
            return e(!l(a.f, C, L), C[L]);
        };
      }, 3130: function(f, t, n) {
        var r = n(9624), l = n(2977), a = n(9275).f, e = n(4546), g = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
        f.exports.f = function(_) {
          return g && r(_) == "Window" ? function(y) {
            try {
              return a(y);
            } catch {
              return e(g);
            }
          }(_) : a(l(_));
        };
      }, 9275: function(f, t, n) {
        var r = n(8356), l = n(5690).concat("length", "prototype");
        t.f = Object.getOwnPropertyNames || function(a) {
          return r(a, l);
        };
      }, 4012: function(f, t) {
        t.f = Object.getOwnPropertySymbols;
      }, 729: function(f, t, n) {
        var r = n(7583), l = n(2870), a = n(9212), e = n(1324), g = n(9137), _ = n(926), y = g("IE_PROTO"), x = r.Object, E = x.prototype;
        f.exports = _ ? x.getPrototypeOf : function(C) {
          var L = e(C);
          if (l(L, y))
            return L[y];
          var A = L.constructor;
          return a(A) && L instanceof A ? A.prototype : L instanceof x ? E : null;
        };
      }, 2447: function(f, t, n) {
        var r = n(7386);
        f.exports = r({}.isPrototypeOf);
      }, 8356: function(f, t, n) {
        var r = n(7386), l = n(2870), a = n(2977), e = n(5766).indexOf, g = n(4639), _ = r([].push);
        f.exports = function(y, x) {
          var E, C = a(y), L = 0, A = [];
          for (E in C)
            !l(g, E) && l(C, E) && _(A, E);
          for (; x.length > L; )
            l(C, E = x[L++]) && (~e(A, E) || _(A, E));
          return A;
        };
      }, 5432: function(f, t, n) {
        var r = n(8356), l = n(5690);
        f.exports = Object.keys || function(a) {
          return r(a, l);
        };
      }, 112: function(f, t) {
        var n = {}.propertyIsEnumerable, r = Object.getOwnPropertyDescriptor, l = r && !n.call({ 1: 2 }, 1);
        t.f = l ? function(a) {
          var e = r(this, a);
          return !!e && e.enumerable;
        } : n;
      }, 7496: function(f, t, n) {
        var r = n(7386), l = n(2569), a = n(9882);
        f.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() {
          var e, g = !1, _ = {};
          try {
            (e = r(Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set))(_, []), g = _ instanceof Array;
          } catch {
          }
          return function(y, x) {
            return l(y), a(x), g ? e(y, x) : y.__proto__ = x, y;
          };
        }() : void 0);
      }, 3060: function(f, t, n) {
        var r = n(8191), l = n(3058);
        f.exports = r ? {}.toString : function() {
          return "[object " + l(this) + "]";
        };
      }, 6252: function(f, t, n) {
        var r = n(7583), l = n(8262), a = n(9212), e = n(794), g = r.TypeError;
        f.exports = function(_, y) {
          var x, E;
          if (y === "string" && a(x = _.toString) && !e(E = l(x, _)) || a(x = _.valueOf) && !e(E = l(x, _)) || y !== "string" && a(x = _.toString) && !e(E = l(x, _)))
            return E;
          throw g("Can't convert object to primitive value");
        };
      }, 929: function(f, t, n) {
        var r = n(5897), l = n(7386), a = n(9275), e = n(4012), g = n(2569), _ = l([].concat);
        f.exports = r("Reflect", "ownKeys") || function(y) {
          var x = a.f(g(y)), E = e.f;
          return E ? _(x, E(y)) : x;
        };
      }, 1287: function(f, t, n) {
        var r = n(7583);
        f.exports = r;
      }, 544: function(f) {
        f.exports = function(t) {
          try {
            return { error: !1, value: t() };
          } catch (n) {
            return { error: !0, value: n };
          }
        };
      }, 5732: function(f, t, n) {
        var r = n(2569), l = n(794), a = n(5084);
        f.exports = function(e, g) {
          if (r(e), l(g) && g.constructor === e)
            return g;
          var _ = a.f(e);
          return (0, _.resolve)(g), _.promise;
        };
      }, 2723: function(f) {
        var t = function() {
          this.head = null, this.tail = null;
        };
        t.prototype = { add: function(n) {
          var r = { item: n, next: null };
          this.head ? this.tail.next = r : this.head = r, this.tail = r;
        }, get: function() {
          var n = this.head;
          if (n)
            return this.head = n.next, this.tail === n && (this.tail = null), n.item;
        } }, f.exports = t;
      }, 6893: function(f, t, n) {
        var r = n(1270);
        f.exports = function(l, a, e) {
          for (var g in a)
            r(l, g, a[g], e);
          return l;
        };
      }, 1270: function(f, t, n) {
        var r = n(7583), l = n(9212), a = n(2870), e = n(57), g = n(460), _ = n(9734), y = n(2743), x = n(4340).CONFIGURABLE, E = y.get, C = y.enforce, L = String(String).split("String");
        (f.exports = function(A, I, D, w) {
          var S, O = !!w && !!w.unsafe, F = !!w && !!w.enumerable, j = !!w && !!w.noTargetGet, P = w && w.name !== void 0 ? w.name : I;
          l(D) && (String(P).slice(0, 7) === "Symbol(" && (P = "[" + String(P).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), (!a(D, "name") || x && D.name !== P) && e(D, "name", P), (S = C(D)).source || (S.source = L.join(typeof P == "string" ? P : ""))), A !== r ? (O ? !j && A[I] && (F = !0) : delete A[I], F ? A[I] = D : e(A, I, D)) : F ? A[I] = D : g(I, D);
        })(Function.prototype, "toString", function() {
          return l(this) && E(this).source || _(this);
        });
      }, 3955: function(f, t, n) {
        var r = n(7583).TypeError;
        f.exports = function(l) {
          if (l == null)
            throw r("Can't call method on " + l);
          return l;
        };
      }, 460: function(f, t, n) {
        var r = n(7583), l = Object.defineProperty;
        f.exports = function(a, e) {
          try {
            l(r, a, { value: e, configurable: !0, writable: !0 });
          } catch {
            r[a] = e;
          }
          return e;
        };
      }, 7730: function(f, t, n) {
        var r = n(5897), l = n(4615), a = n(3649), e = n(8494), g = a("species");
        f.exports = function(_) {
          var y = r(_), x = l.f;
          e && y && !y[g] && x(y, g, { configurable: !0, get: function() {
            return this;
          } });
        };
      }, 8821: function(f, t, n) {
        var r = n(4615).f, l = n(2870), a = n(3649)("toStringTag");
        f.exports = function(e, g, _) {
          e && !_ && (e = e.prototype), e && !l(e, a) && r(e, a, { configurable: !0, value: g });
        };
      }, 9137: function(f, t, n) {
        var r = n(7836), l = n(8284), a = r("keys");
        f.exports = function(e) {
          return a[e] || (a[e] = l(e));
        };
      }, 1314: function(f, t, n) {
        var r = n(7583), l = n(460), a = "__core-js_shared__", e = r[a] || l(a, {});
        f.exports = e;
      }, 7836: function(f, t, n) {
        var r = n(6268), l = n(1314);
        (f.exports = function(a, e) {
          return l[a] || (l[a] = e !== void 0 ? e : {});
        })("versions", []).push({ version: "3.21.1", mode: r ? "pure" : "global", copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE", source: "https://github.com/zloirock/core-js" });
      }, 564: function(f, t, n) {
        var r = n(2569), l = n(1186), a = n(3649)("species");
        f.exports = function(e, g) {
          var _, y = r(e).constructor;
          return y === void 0 || (_ = r(y)[a]) == null ? g : l(_);
        };
      }, 6389: function(f, t, n) {
        var r = n(7386), l = n(7486), a = n(8320), e = n(3955), g = r("".charAt), _ = r("".charCodeAt), y = r("".slice), x = function(E) {
          return function(C, L) {
            var A, I, D = a(e(C)), w = l(L), S = D.length;
            return w < 0 || w >= S ? E ? "" : void 0 : (A = _(D, w)) < 55296 || A > 56319 || w + 1 === S || (I = _(D, w + 1)) < 56320 || I > 57343 ? E ? g(D, w) : A : E ? y(D, w, w + 2) : I - 56320 + (A - 55296 << 10) + 65536;
          };
        };
        f.exports = { codeAt: x(!1), charAt: x(!0) };
      }, 8117: function(f, t, n) {
        var r, l, a, e, g = n(7583), _ = n(1611), y = n(2938), x = n(9212), E = n(2870), C = n(6544), L = n(482), A = n(6917), I = n(6668), D = n(7520), w = n(7020), S = n(5354), O = g.setImmediate, F = g.clearImmediate, j = g.process, P = g.Dispatch, $ = g.Function, V = g.MessageChannel, q = g.String, ee = 0, re = {}, ye = "onreadystatechange";
        try {
          r = g.location;
        } catch {
        }
        var ce = function(G) {
          if (E(re, G)) {
            var K = re[G];
            delete re[G], K();
          }
        }, Q = function(G) {
          return function() {
            ce(G);
          };
        }, se = function(G) {
          ce(G.data);
        }, fe = function(G) {
          g.postMessage(q(G), r.protocol + "//" + r.host);
        };
        O && F || (O = function(G) {
          D(arguments.length, 1);
          var K = x(G) ? G : $(G), de = A(arguments, 1);
          return re[++ee] = function() {
            _(K, void 0, de);
          }, l(ee), ee;
        }, F = function(G) {
          delete re[G];
        }, S ? l = function(G) {
          j.nextTick(Q(G));
        } : P && P.now ? l = function(G) {
          P.now(Q(G));
        } : V && !w ? (e = (a = new V()).port2, a.port1.onmessage = se, l = y(e.postMessage, e)) : g.addEventListener && x(g.postMessage) && !g.importScripts && r && r.protocol !== "file:" && !C(fe) ? (l = fe, g.addEventListener("message", se, !1)) : l = ye in I("script") ? function(G) {
          L.appendChild(I("script")).onreadystatechange = function() {
            L.removeChild(this), ce(G);
          };
        } : function(G) {
          setTimeout(Q(G), 0);
        }), f.exports = { set: O, clear: F };
      }, 6782: function(f, t, n) {
        var r = n(7486), l = Math.max, a = Math.min;
        f.exports = function(e, g) {
          var _ = r(e);
          return _ < 0 ? l(_ + g, 0) : a(_, g);
        };
      }, 2977: function(f, t, n) {
        var r = n(5044), l = n(3955);
        f.exports = function(a) {
          return r(l(a));
        };
      }, 7486: function(f) {
        var t = Math.ceil, n = Math.floor;
        f.exports = function(r) {
          var l = +r;
          return l != l || l === 0 ? 0 : (l > 0 ? n : t)(l);
        };
      }, 97: function(f, t, n) {
        var r = n(7486), l = Math.min;
        f.exports = function(a) {
          return a > 0 ? l(r(a), 9007199254740991) : 0;
        };
      }, 1324: function(f, t, n) {
        var r = n(7583), l = n(3955), a = r.Object;
        f.exports = function(e) {
          return a(l(e));
        };
      }, 2670: function(f, t, n) {
        var r = n(7583), l = n(8262), a = n(794), e = n(5871), g = n(911), _ = n(6252), y = n(3649), x = r.TypeError, E = y("toPrimitive");
        f.exports = function(C, L) {
          if (!a(C) || e(C))
            return C;
          var A, I = g(C, E);
          if (I) {
            if (L === void 0 && (L = "default"), A = l(I, C, L), !a(A) || e(A))
              return A;
            throw x("Can't convert object to primitive value");
          }
          return L === void 0 && (L = "number"), _(C, L);
        };
      }, 8734: function(f, t, n) {
        var r = n(2670), l = n(5871);
        f.exports = function(a) {
          var e = r(a, "string");
          return l(e) ? e : e + "";
        };
      }, 8191: function(f, t, n) {
        var r = {};
        r[n(3649)("toStringTag")] = "z", f.exports = String(r) === "[object z]";
      }, 8320: function(f, t, n) {
        var r = n(7583), l = n(3058), a = r.String;
        f.exports = function(e) {
          if (l(e) === "Symbol")
            throw TypeError("Cannot convert a Symbol value to a string");
          return a(e);
        };
      }, 5637: function(f, t, n) {
        var r = n(7583).String;
        f.exports = function(l) {
          try {
            return r(l);
          } catch {
            return "Object";
          }
        };
      }, 8284: function(f, t, n) {
        var r = n(7386), l = 0, a = Math.random(), e = r(1 .toString);
        f.exports = function(g) {
          return "Symbol(" + (g === void 0 ? "" : g) + ")_" + e(++l + a, 36);
        };
      }, 7786: function(f, t, n) {
        var r = n(8640);
        f.exports = r && !Symbol.sham && typeof Symbol.iterator == "symbol";
      }, 7670: function(f, t, n) {
        var r = n(8494), l = n(6544);
        f.exports = r && l(function() {
          return Object.defineProperty(function() {
          }, "prototype", { value: 42, writable: !1 }).prototype != 42;
        });
      }, 7520: function(f, t, n) {
        var r = n(7583).TypeError;
        f.exports = function(l, a) {
          if (l < a)
            throw r("Not enough arguments");
          return l;
        };
      }, 491: function(f, t, n) {
        var r = n(3649);
        t.f = r;
      }, 3649: function(f, t, n) {
        var r = n(7583), l = n(7836), a = n(2870), e = n(8284), g = n(8640), _ = n(7786), y = l("wks"), x = r.Symbol, E = x && x.for, C = _ ? x : x && x.withoutSetter || e;
        f.exports = function(L) {
          if (!a(y, L) || !g && typeof y[L] != "string") {
            var A = "Symbol." + L;
            g && a(x, L) ? y[L] = x[L] : y[L] = _ && E ? E(A) : C(A);
          }
          return y[L];
        };
      }, 1719: function(f, t, n) {
        var r = n(7263), l = n(7583), a = n(2447), e = n(729), g = n(7496), _ = n(3478), y = n(3590), x = n(57), E = n(4677), C = n(1509), L = n(4402), A = n(4026), I = n(2764), D = n(3649), w = n(1178), S = D("toStringTag"), O = l.Error, F = [].push, j = function($, V) {
          var q, ee = arguments.length > 2 ? arguments[2] : void 0, re = a(P, this);
          g ? q = g(new O(), re ? e(this) : P) : (q = re ? this : y(P), x(q, S, "Error")), V !== void 0 && x(q, "message", I(V)), w && x(q, "stack", C(q.stack, 1)), L(q, ee);
          var ye = [];
          return A($, F, { that: ye }), x(q, "errors", ye), q;
        };
        g ? g(j, O) : _(j, O, { name: !0 });
        var P = j.prototype = y(O.prototype, { constructor: E(1, j), message: E(1, ""), name: E(1, "AggregateError") });
        r({ global: !0 }, { AggregateError: j });
      }, 1646: function(f, t, n) {
        var r = n(7263), l = n(7583), a = n(6544), e = n(4521), g = n(794), _ = n(1324), y = n(1825), x = n(5999), E = n(4822), C = n(9269), L = n(3649), A = n(4061), I = L("isConcatSpreadable"), D = 9007199254740991, w = "Maximum allowed index exceeded", S = l.TypeError, O = A >= 51 || !a(function() {
          var P = [];
          return P[I] = !1, P.concat()[0] !== P;
        }), F = C("concat"), j = function(P) {
          if (!g(P))
            return !1;
          var $ = P[I];
          return $ !== void 0 ? !!$ : e(P);
        };
        r({ target: "Array", proto: !0, forced: !O || !F }, { concat: function(P) {
          var $, V, q, ee, re, ye = _(this), ce = E(ye, 0), Q = 0;
          for ($ = -1, q = arguments.length; $ < q; $++)
            if (j(re = $ === -1 ? ye : arguments[$])) {
              if (Q + (ee = y(re)) > D)
                throw S(w);
              for (V = 0; V < ee; V++, Q++)
                V in re && x(ce, Q, re[V]);
            } else {
              if (Q >= D)
                throw S(w);
              x(ce, Q++, re);
            }
          return ce.length = Q, ce;
        } });
      }, 5677: function(f, t, n) {
        var r = n(2977), l = n(6288), a = n(339), e = n(2743), g = n(4615).f, _ = n(9012), y = n(6268), x = n(8494), E = "Array Iterator", C = e.set, L = e.getterFor(E);
        f.exports = _(Array, "Array", function(I, D) {
          C(this, { type: E, target: r(I), index: 0, kind: D });
        }, function() {
          var I = L(this), D = I.target, w = I.kind, S = I.index++;
          return !D || S >= D.length ? (I.target = void 0, { value: void 0, done: !0 }) : w == "keys" ? { value: S, done: !1 } : w == "values" ? { value: D[S], done: !1 } : { value: [S, D[S]], done: !1 };
        }, "values");
        var A = a.Arguments = a.Array;
        if (l("keys"), l("values"), l("entries"), !y && x && A.name !== "values")
          try {
            g(A, "name", { value: "values" });
          } catch {
          }
      }, 6956: function(f, t, n) {
        var r = n(7583);
        n(8821)(r.JSON, "JSON", !0);
      }, 5222: function(f, t, n) {
        n(8821)(Math, "Math", !0);
      }, 6394: function(f, t, n) {
        var r = n(8191), l = n(1270), a = n(3060);
        r || l(Object.prototype, "toString", a, { unsafe: !0 });
      }, 6969: function(f, t, n) {
        var r = n(7263), l = n(8262), a = n(8257), e = n(5084), g = n(544), _ = n(4026);
        r({ target: "Promise", stat: !0 }, { allSettled: function(y) {
          var x = this, E = e.f(x), C = E.resolve, L = E.reject, A = g(function() {
            var I = a(x.resolve), D = [], w = 0, S = 1;
            _(y, function(O) {
              var F = w++, j = !1;
              S++, l(I, x, O).then(function(P) {
                j || (j = !0, D[F] = { status: "fulfilled", value: P }, --S || C(D));
              }, function(P) {
                j || (j = !0, D[F] = { status: "rejected", reason: P }, --S || C(D));
              });
            }), --S || C(D);
          });
          return A.error && L(A.value), E.promise;
        } });
      }, 2021: function(f, t, n) {
        var r = n(7263), l = n(8257), a = n(5897), e = n(8262), g = n(5084), _ = n(544), y = n(4026), x = "No one promise resolved";
        r({ target: "Promise", stat: !0 }, { any: function(E) {
          var C = this, L = a("AggregateError"), A = g.f(C), I = A.resolve, D = A.reject, w = _(function() {
            var S = l(C.resolve), O = [], F = 0, j = 1, P = !1;
            y(E, function($) {
              var V = F++, q = !1;
              j++, e(S, C, $).then(function(ee) {
                q || P || (P = !0, I(ee));
              }, function(ee) {
                q || P || (q = !0, O[V] = ee, --j || D(new L(O, x)));
              });
            }), --j || D(new L(O, x));
          });
          return w.error && D(w.value), A.promise;
        } });
      }, 8328: function(f, t, n) {
        var r = n(7263), l = n(6268), a = n(783), e = n(6544), g = n(5897), _ = n(9212), y = n(564), x = n(5732), E = n(1270);
        if (r({ target: "Promise", proto: !0, real: !0, forced: !!a && e(function() {
          a.prototype.finally.call({ then: function() {
          } }, function() {
          });
        }) }, { finally: function(L) {
          var A = y(this, g("Promise")), I = _(L);
          return this.then(I ? function(D) {
            return x(A, L()).then(function() {
              return D;
            });
          } : L, I ? function(D) {
            return x(A, L()).then(function() {
              throw D;
            });
          } : L);
        } }), !l && _(a)) {
          var C = g("Promise").prototype.finally;
          a.prototype.finally !== C && E(a.prototype, "finally", C, { unsafe: !0 });
        }
      }, 5334: function(f, t, n) {
        var r, l, a, e, g = n(7263), _ = n(6268), y = n(7583), x = n(5897), E = n(8262), C = n(783), L = n(1270), A = n(6893), I = n(7496), D = n(8821), w = n(7730), S = n(8257), O = n(9212), F = n(794), j = n(4761), P = n(9734), $ = n(4026), V = n(3616), q = n(564), ee = n(8117).set, re = n(2095), ye = n(5732), ce = n(2716), Q = n(5084), se = n(544), fe = n(2723), G = n(2743), K = n(4451), de = n(3649), ve = n(2274), ae = n(5354), J = n(4061), U = de("species"), X = "Promise", ne = G.getterFor(X), we = G.set, Oe = G.getterFor(X), Xe = C && C.prototype, Ye = C, Pe = Xe, Ve = y.TypeError, Ze = y.document, ot = y.process, tt = Q.f, Ge = tt, We = !!(Ze && Ze.createEvent && y.dispatchEvent), He = O(y.PromiseRejectionEvent), ft = "unhandledrejection", Tt = !1, Lt = K(X, function() {
          var me = P(Ye), Ee = me !== String(Ye);
          if (!Ee && J === 66 || _ && !Pe.finally)
            return !0;
          if (J >= 51 && /native code/.test(me))
            return !1;
          var Ae = new Ye(function(it) {
            it(1);
          }), De = function(it) {
            it(function() {
            }, function() {
            });
          };
          return (Ae.constructor = {})[U] = De, !(Tt = Ae.then(function() {
          }) instanceof De) || !Ee && ve && !He;
        }), en = Lt || !V(function(me) {
          Ye.all(me).catch(function() {
          });
        }), Pt = function(me) {
          var Ee;
          return !(!F(me) || !O(Ee = me.then)) && Ee;
        }, St = function(me, Ee) {
          var Ae, De, it, pt = Ee.value, Bt = Ee.state == 1, H = Bt ? me.ok : me.fail, te = me.resolve, Y = me.reject, ie = me.domain;
          try {
            H ? (Bt || (Ee.rejection === 2 && tn(Ee), Ee.rejection = 1), H === !0 ? Ae = pt : (ie && ie.enter(), Ae = H(pt), ie && (ie.exit(), it = !0)), Ae === me.promise ? Y(Ve("Promise-chain cycle")) : (De = Pt(Ae)) ? E(De, Ae, te, Y) : te(Ae)) : Y(pt);
          } catch (ge) {
            ie && !it && ie.exit(), Y(ge);
          }
        }, $t = function(me, Ee) {
          me.notified || (me.notified = !0, re(function() {
            for (var Ae, De = me.reactions; Ae = De.get(); )
              St(Ae, me);
            me.notified = !1, Ee && !me.rejection && bt(me);
          }));
        }, sn = function(me, Ee, Ae) {
          var De, it;
          We ? ((De = Ze.createEvent("Event")).promise = Ee, De.reason = Ae, De.initEvent(me, !1, !0), y.dispatchEvent(De)) : De = { promise: Ee, reason: Ae }, !He && (it = y["on" + me]) ? it(De) : me === ft && ce("Unhandled promise rejection", Ae);
        }, bt = function(me) {
          E(ee, y, function() {
            var Ee, Ae = me.facade, De = me.value;
            if (Vt(me) && (Ee = se(function() {
              ae ? ot.emit("unhandledRejection", De, Ae) : sn(ft, Ae, De);
            }), me.rejection = ae || Vt(me) ? 2 : 1, Ee.error))
              throw Ee.value;
          });
        }, Vt = function(me) {
          return me.rejection !== 1 && !me.parent;
        }, tn = function(me) {
          E(ee, y, function() {
            var Ee = me.facade;
            ae ? ot.emit("rejectionHandled", Ee) : sn("rejectionhandled", Ee, me.value);
          });
        }, Gt = function(me, Ee, Ae) {
          return function(De) {
            me(Ee, De, Ae);
          };
        }, xt = function(me, Ee, Ae) {
          me.done || (me.done = !0, Ae && (me = Ae), me.value = Ee, me.state = 2, $t(me, !0));
        }, Xt = function me(Ee, Ae, De) {
          if (!Ee.done) {
            Ee.done = !0, De && (Ee = De);
            try {
              if (Ee.facade === Ae)
                throw Ve("Promise can't be resolved itself");
              var it = Pt(Ae);
              it ? re(function() {
                var pt = { done: !1 };
                try {
                  E(it, Ae, Gt(me, pt, Ee), Gt(xt, pt, Ee));
                } catch (Bt) {
                  xt(pt, Bt, Ee);
                }
              }) : (Ee.value = Ae, Ee.state = 1, $t(Ee, !1));
            } catch (pt) {
              xt({ done: !1 }, pt, Ee);
            }
          }
        };
        if (Lt && (Pe = (Ye = function(me) {
          j(this, Pe), S(me), E(r, this);
          var Ee = ne(this);
          try {
            me(Gt(Xt, Ee), Gt(xt, Ee));
          } catch (Ae) {
            xt(Ee, Ae);
          }
        }).prototype, (r = function(me) {
          we(this, { type: X, done: !1, notified: !1, parent: !1, reactions: new fe(), rejection: !1, state: 0, value: void 0 });
        }).prototype = A(Pe, { then: function(me, Ee) {
          var Ae = Oe(this), De = tt(q(this, Ye));
          return Ae.parent = !0, De.ok = !O(me) || me, De.fail = O(Ee) && Ee, De.domain = ae ? ot.domain : void 0, Ae.state == 0 ? Ae.reactions.add(De) : re(function() {
            St(De, Ae);
          }), De.promise;
        }, catch: function(me) {
          return this.then(void 0, me);
        } }), l = function() {
          var me = new r(), Ee = ne(me);
          this.promise = me, this.resolve = Gt(Xt, Ee), this.reject = Gt(xt, Ee);
        }, Q.f = tt = function(me) {
          return me === Ye || me === a ? new l(me) : Ge(me);
        }, !_ && O(C) && Xe !== Object.prototype)) {
          e = Xe.then, Tt || (L(Xe, "then", function(me, Ee) {
            var Ae = this;
            return new Ye(function(De, it) {
              E(e, Ae, De, it);
            }).then(me, Ee);
          }, { unsafe: !0 }), L(Xe, "catch", Pe.catch, { unsafe: !0 }));
          try {
            delete Xe.constructor;
          } catch {
          }
          I && I(Xe, Pe);
        }
        g({ global: !0, wrap: !0, forced: Lt }, { Promise: Ye }), D(Ye, X, !1, !0), w(X), a = x(X), g({ target: X, stat: !0, forced: Lt }, { reject: function(me) {
          var Ee = tt(this);
          return E(Ee.reject, void 0, me), Ee.promise;
        } }), g({ target: X, stat: !0, forced: _ || Lt }, { resolve: function(me) {
          return ye(_ && this === a ? Ye : this, me);
        } }), g({ target: X, stat: !0, forced: en }, { all: function(me) {
          var Ee = this, Ae = tt(Ee), De = Ae.resolve, it = Ae.reject, pt = se(function() {
            var Bt = S(Ee.resolve), H = [], te = 0, Y = 1;
            $(me, function(ie) {
              var ge = te++, ke = !1;
              Y++, E(Bt, Ee, ie).then(function(Be) {
                ke || (ke = !0, H[ge] = Be, --Y || De(H));
              }, it);
            }), --Y || De(H);
          });
          return pt.error && it(pt.value), Ae.promise;
        }, race: function(me) {
          var Ee = this, Ae = tt(Ee), De = Ae.reject, it = se(function() {
            var pt = S(Ee.resolve);
            $(me, function(Bt) {
              E(pt, Ee, Bt).then(Ae.resolve, De);
            });
          });
          return it.error && De(it.value), Ae.promise;
        } });
      }, 2257: function(f, t, n) {
        var r = n(7263), l = n(7583), a = n(8821);
        r({ global: !0 }, { Reflect: {} }), a(l.Reflect, "Reflect", !0);
      }, 2129: function(f, t, n) {
        var r = n(6389).charAt, l = n(8320), a = n(2743), e = n(9012), g = "String Iterator", _ = a.set, y = a.getterFor(g);
        e(String, "String", function(x) {
          _(this, { type: g, string: l(x), index: 0 });
        }, function() {
          var x, E = y(this), C = E.string, L = E.index;
          return L >= C.length ? { value: void 0, done: !0 } : (x = r(C, L), E.index += x.length, { value: x, done: !1 });
        });
      }, 462: function(f, t, n) {
        n(2219)("asyncIterator");
      }, 8407: function(f, t, n) {
        var r = n(7263), l = n(8494), a = n(7583), e = n(7386), g = n(2870), _ = n(9212), y = n(2447), x = n(8320), E = n(4615).f, C = n(3478), L = a.Symbol, A = L && L.prototype;
        if (l && _(L) && (!("description" in A) || L().description !== void 0)) {
          var I = {}, D = function() {
            var $ = arguments.length < 1 || arguments[0] === void 0 ? void 0 : x(arguments[0]), V = y(A, this) ? new L($) : $ === void 0 ? L() : L($);
            return $ === "" && (I[V] = !0), V;
          };
          C(D, L), D.prototype = A, A.constructor = D;
          var w = String(L("test")) == "Symbol(test)", S = e(A.toString), O = e(A.valueOf), F = /^Symbol\((.*)\)[^)]+$/, j = e("".replace), P = e("".slice);
          E(A, "description", { configurable: !0, get: function() {
            var $ = O(this), V = S($);
            if (g(I, $))
              return "";
            var q = w ? P(V, 7, -1) : j(V, F, "$1");
            return q === "" ? void 0 : q;
          } }), r({ global: !0, forced: !0 }, { Symbol: D });
        }
      }, 2429: function(f, t, n) {
        n(2219)("hasInstance");
      }, 1172: function(f, t, n) {
        n(2219)("isConcatSpreadable");
      }, 8288: function(f, t, n) {
        n(2219)("iterator");
      }, 2004: function(f, t, n) {
        var r = n(7263), l = n(7583), a = n(5897), e = n(1611), g = n(8262), _ = n(7386), y = n(6268), x = n(8494), E = n(8640), C = n(6544), L = n(2870), A = n(4521), I = n(9212), D = n(794), w = n(2447), S = n(5871), O = n(2569), F = n(1324), j = n(2977), P = n(8734), $ = n(8320), V = n(4677), q = n(3590), ee = n(5432), re = n(9275), ye = n(3130), ce = n(4012), Q = n(6683), se = n(4615), fe = n(8728), G = n(112), K = n(6917), de = n(1270), ve = n(7836), ae = n(9137), J = n(4639), U = n(8284), X = n(3649), ne = n(491), we = n(2219), Oe = n(8821), Xe = n(2743), Ye = n(4805).forEach, Pe = ae("hidden"), Ve = "Symbol", Ze = X("toPrimitive"), ot = Xe.set, tt = Xe.getterFor(Ve), Ge = Object.prototype, We = l.Symbol, He = We && We.prototype, ft = l.TypeError, Tt = l.QObject, Lt = a("JSON", "stringify"), en = Q.f, Pt = se.f, St = ye.f, $t = G.f, sn = _([].push), bt = ve("symbols"), Vt = ve("op-symbols"), tn = ve("string-to-symbol-registry"), Gt = ve("symbol-to-string-registry"), xt = ve("wks"), Xt = !Tt || !Tt.prototype || !Tt.prototype.findChild, me = x && C(function() {
          return q(Pt({}, "a", { get: function() {
            return Pt(this, "a", { value: 7 }).a;
          } })).a != 7;
        }) ? function(Y, ie, ge) {
          var ke = en(Ge, ie);
          ke && delete Ge[ie], Pt(Y, ie, ge), ke && Y !== Ge && Pt(Ge, ie, ke);
        } : Pt, Ee = function(Y, ie) {
          var ge = bt[Y] = q(He);
          return ot(ge, { type: Ve, tag: Y, description: ie }), x || (ge.description = ie), ge;
        }, Ae = function(Y, ie, ge) {
          Y === Ge && Ae(Vt, ie, ge), O(Y);
          var ke = P(ie);
          return O(ge), L(bt, ke) ? (ge.enumerable ? (L(Y, Pe) && Y[Pe][ke] && (Y[Pe][ke] = !1), ge = q(ge, { enumerable: V(0, !1) })) : (L(Y, Pe) || Pt(Y, Pe, V(1, {})), Y[Pe][ke] = !0), me(Y, ke, ge)) : Pt(Y, ke, ge);
        }, De = function(Y, ie) {
          O(Y);
          var ge = j(ie), ke = ee(ge).concat(H(ge));
          return Ye(ke, function(Be) {
            x && !g(it, ge, Be) || Ae(Y, Be, ge[Be]);
          }), Y;
        }, it = function(Y) {
          var ie = P(Y), ge = g($t, this, ie);
          return !(this === Ge && L(bt, ie) && !L(Vt, ie)) && (!(ge || !L(this, ie) || !L(bt, ie) || L(this, Pe) && this[Pe][ie]) || ge);
        }, pt = function(Y, ie) {
          var ge = j(Y), ke = P(ie);
          if (ge !== Ge || !L(bt, ke) || L(Vt, ke)) {
            var Be = en(ge, ke);
            return !Be || !L(bt, ke) || L(ge, Pe) && ge[Pe][ke] || (Be.enumerable = !0), Be;
          }
        }, Bt = function(Y) {
          var ie = St(j(Y)), ge = [];
          return Ye(ie, function(ke) {
            L(bt, ke) || L(J, ke) || sn(ge, ke);
          }), ge;
        }, H = function(Y) {
          var ie = Y === Ge, ge = St(ie ? Vt : j(Y)), ke = [];
          return Ye(ge, function(Be) {
            !L(bt, Be) || ie && !L(Ge, Be) || sn(ke, bt[Be]);
          }), ke;
        };
        if (E || (We = function() {
          if (w(He, this))
            throw ft("Symbol is not a constructor");
          var Y = arguments.length && arguments[0] !== void 0 ? $(arguments[0]) : void 0, ie = U(Y), ge = function ke(Be) {
            this === Ge && g(ke, Vt, Be), L(this, Pe) && L(this[Pe], ie) && (this[Pe][ie] = !1), me(this, ie, V(1, Be));
          };
          return x && Xt && me(Ge, ie, { configurable: !0, set: ge }), Ee(ie, Y);
        }, de(He = We.prototype, "toString", function() {
          return tt(this).tag;
        }), de(We, "withoutSetter", function(Y) {
          return Ee(U(Y), Y);
        }), G.f = it, se.f = Ae, fe.f = De, Q.f = pt, re.f = ye.f = Bt, ce.f = H, ne.f = function(Y) {
          return Ee(X(Y), Y);
        }, x && (Pt(He, "description", { configurable: !0, get: function() {
          return tt(this).description;
        } }), y || de(Ge, "propertyIsEnumerable", it, { unsafe: !0 }))), r({ global: !0, wrap: !0, forced: !E, sham: !E }, { Symbol: We }), Ye(ee(xt), function(Y) {
          we(Y);
        }), r({ target: Ve, stat: !0, forced: !E }, { for: function(Y) {
          var ie = $(Y);
          if (L(tn, ie))
            return tn[ie];
          var ge = We(ie);
          return tn[ie] = ge, Gt[ge] = ie, ge;
        }, keyFor: function(Y) {
          if (!S(Y))
            throw ft(Y + " is not a symbol");
          if (L(Gt, Y))
            return Gt[Y];
        }, useSetter: function() {
          Xt = !0;
        }, useSimple: function() {
          Xt = !1;
        } }), r({ target: "Object", stat: !0, forced: !E, sham: !x }, { create: function(Y, ie) {
          return ie === void 0 ? q(Y) : De(q(Y), ie);
        }, defineProperty: Ae, defineProperties: De, getOwnPropertyDescriptor: pt }), r({ target: "Object", stat: !0, forced: !E }, { getOwnPropertyNames: Bt, getOwnPropertySymbols: H }), r({ target: "Object", stat: !0, forced: C(function() {
          ce.f(1);
        }) }, { getOwnPropertySymbols: function(Y) {
          return ce.f(F(Y));
        } }), Lt && r({ target: "JSON", stat: !0, forced: !E || C(function() {
          var Y = We();
          return Lt([Y]) != "[null]" || Lt({ a: Y }) != "{}" || Lt(Object(Y)) != "{}";
        }) }, { stringify: function(Y, ie, ge) {
          var ke = K(arguments), Be = ie;
          if ((D(ie) || Y !== void 0) && !S(Y))
            return A(ie) || (ie = function(ut, Ct) {
              if (I(Be) && (Ct = g(Be, this, ut, Ct)), !S(Ct))
                return Ct;
            }), ke[1] = ie, e(Lt, null, ke);
        } }), !He[Ze]) {
          var te = He.valueOf;
          de(He, Ze, function(Y) {
            return g(te, this);
          });
        }
        Oe(We, Ve), J[Pe] = !0;
      }, 8201: function(f, t, n) {
        n(2219)("matchAll");
      }, 1274: function(f, t, n) {
        n(2219)("match");
      }, 6626: function(f, t, n) {
        n(2219)("replace");
      }, 3211: function(f, t, n) {
        n(2219)("search");
      }, 9952: function(f, t, n) {
        n(2219)("species");
      }, 15: function(f, t, n) {
        n(2219)("split");
      }, 9831: function(f, t, n) {
        n(2219)("toPrimitive");
      }, 7521: function(f, t, n) {
        n(2219)("toStringTag");
      }, 2972: function(f, t, n) {
        n(2219)("unscopables");
      }, 4655: function(f, t, n) {
        var r = n(7583), l = n(6778), a = n(9307), e = n(5677), g = n(57), _ = n(3649), y = _("iterator"), x = _("toStringTag"), E = e.values, C = function(A, I) {
          if (A) {
            if (A[y] !== E)
              try {
                g(A, y, E);
              } catch {
                A[y] = E;
              }
            if (A[x] || g(A, x, I), l[I]) {
              for (var D in e)
                if (A[D] !== e[D])
                  try {
                    g(A, D, e[D]);
                  } catch {
                    A[D] = e[D];
                  }
            }
          }
        };
        for (var L in l)
          C(r[L] && r[L].prototype, L);
        C(a, "DOMTokenList");
      }, 8765: function(f, t, n) {
        var r = n(5036);
        n(4655), f.exports = r;
      }, 5441: function(f, t, n) {
        var r = n(2582);
        n(4655), f.exports = r;
      }, 7705: function(f) {
        f.exports = function(t) {
          var n = [];
          return n.toString = function() {
            return this.map(function(r) {
              var l = "", a = r[5] !== void 0;
              return r[4] && (l += "@supports (".concat(r[4], ") {")), r[2] && (l += "@media ".concat(r[2], " {")), a && (l += "@layer".concat(r[5].length > 0 ? " ".concat(r[5]) : "", " {")), l += t(r), a && (l += "}"), r[2] && (l += "}"), r[4] && (l += "}"), l;
            }).join("");
          }, n.i = function(r, l, a, e, g) {
            typeof r == "string" && (r = [[null, r, void 0]]);
            var _ = {};
            if (a)
              for (var y = 0; y < this.length; y++) {
                var x = this[y][0];
                x != null && (_[x] = !0);
              }
            for (var E = 0; E < r.length; E++) {
              var C = [].concat(r[E]);
              a && _[C[0]] || (g !== void 0 && (C[5] === void 0 || (C[1] = "@layer".concat(C[5].length > 0 ? " ".concat(C[5]) : "", " {").concat(C[1], "}")), C[5] = g), l && (C[2] && (C[1] = "@media ".concat(C[2], " {").concat(C[1], "}")), C[2] = l), e && (C[4] ? (C[1] = "@supports (".concat(C[4], ") {").concat(C[1], "}"), C[4] = e) : C[4] = "".concat(e)), n.push(C));
            }
          }, n;
        };
      }, 6738: function(f) {
        f.exports = function(t) {
          return t[1];
        };
      }, 8679: function(f) {
        var t = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, n = window.WeakMap;
        if (n === void 0) {
          var r = Object.defineProperty, l = Date.now() % 1e9;
          (n = function() {
            this.name = "__st" + (1e9 * Math.random() >>> 0) + l++ + "__";
          }).prototype = { set: function(P, $) {
            var V = P[this.name];
            return V && V[0] === P ? V[1] = $ : r(P, this.name, { value: [P, $], writable: !0 }), this;
          }, get: function(P) {
            var $;
            return ($ = P[this.name]) && $[0] === P ? $[1] : void 0;
          }, delete: function(P) {
            var $ = P[this.name];
            if (!$)
              return !1;
            var V = $[0] === P;
            return $[0] = $[1] = void 0, V;
          }, has: function(P) {
            var $ = P[this.name];
            return !!$ && $[0] === P;
          } };
        }
        var a = new n(), e = window.msSetImmediate;
        if (!e) {
          var g = [], _ = String(Math.random());
          window.addEventListener("message", function(P) {
            if (P.data === _) {
              var $ = g;
              g = [], $.forEach(function(V) {
                V();
              });
            }
          }), e = function(P) {
            g.push(P), window.postMessage(_, "*");
          };
        }
        var y = !1, x = [];
        function E() {
          y = !1;
          var P = x;
          x = [], P.sort(function(V, q) {
            return V.uid_ - q.uid_;
          });
          var $ = !1;
          P.forEach(function(V) {
            var q = V.takeRecords();
            (function(ee) {
              ee.nodes_.forEach(function(re) {
                var ye = a.get(re);
                ye && ye.forEach(function(ce) {
                  ce.observer === ee && ce.removeTransientObservers();
                });
              });
            })(V), q.length && (V.callback_(q, V), $ = !0);
          }), $ && E();
        }
        function C(P, $) {
          for (var V = P; V; V = V.parentNode) {
            var q = a.get(V);
            if (q)
              for (var ee = 0; ee < q.length; ee++) {
                var re = q[ee], ye = re.options;
                if (V === P || ye.subtree) {
                  var ce = $(ye);
                  ce && re.enqueue(ce);
                }
              }
          }
        }
        var L, A, I = 0;
        function D(P) {
          this.callback_ = P, this.nodes_ = [], this.records_ = [], this.uid_ = ++I;
        }
        function w(P, $) {
          this.type = P, this.target = $, this.addedNodes = [], this.removedNodes = [], this.previousSibling = null, this.nextSibling = null, this.attributeName = null, this.attributeNamespace = null, this.oldValue = null;
        }
        function S(P, $) {
          return L = new w(P, $);
        }
        function O(P) {
          return A || ((V = new w(($ = L).type, $.target)).addedNodes = $.addedNodes.slice(), V.removedNodes = $.removedNodes.slice(), V.previousSibling = $.previousSibling, V.nextSibling = $.nextSibling, V.attributeName = $.attributeName, V.attributeNamespace = $.attributeNamespace, V.oldValue = $.oldValue, (A = V).oldValue = P, A);
          var $, V;
        }
        function F(P, $) {
          return P === $ ? P : A && ((V = P) === A || V === L) ? A : null;
          var V;
        }
        function j(P, $, V) {
          this.observer = P, this.target = $, this.options = V, this.transientObservedNodes = [];
        }
        D.prototype = { observe: function(P, $) {
          var V;
          if (V = P, P = window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(V) || V, !$.childList && !$.attributes && !$.characterData || $.attributeOldValue && !$.attributes || $.attributeFilter && $.attributeFilter.length && !$.attributes || $.characterDataOldValue && !$.characterData)
            throw new SyntaxError();
          var q, ee = a.get(P);
          ee || a.set(P, ee = []);
          for (var re = 0; re < ee.length; re++)
            if (ee[re].observer === this) {
              (q = ee[re]).removeListeners(), q.options = $;
              break;
            }
          q || (q = new j(this, P, $), ee.push(q), this.nodes_.push(P)), q.addListeners();
        }, disconnect: function() {
          this.nodes_.forEach(function(P) {
            for (var $ = a.get(P), V = 0; V < $.length; V++) {
              var q = $[V];
              if (q.observer === this) {
                q.removeListeners(), $.splice(V, 1);
                break;
              }
            }
          }, this), this.records_ = [];
        }, takeRecords: function() {
          var P = this.records_;
          return this.records_ = [], P;
        } }, j.prototype = { enqueue: function(P) {
          var $, V = this.observer.records_, q = V.length;
          if (V.length > 0) {
            var ee = F(V[q - 1], P);
            if (ee)
              return void (V[q - 1] = ee);
          } else
            $ = this.observer, x.push($), y || (y = !0, e(E));
          V[q] = P;
        }, addListeners: function() {
          this.addListeners_(this.target);
        }, addListeners_: function(P) {
          var $ = this.options;
          $.attributes && P.addEventListener("DOMAttrModified", this, !0), $.characterData && P.addEventListener("DOMCharacterDataModified", this, !0), $.childList && P.addEventListener("DOMNodeInserted", this, !0), ($.childList || $.subtree) && P.addEventListener("DOMNodeRemoved", this, !0);
        }, removeListeners: function() {
          this.removeListeners_(this.target);
        }, removeListeners_: function(P) {
          var $ = this.options;
          $.attributes && P.removeEventListener("DOMAttrModified", this, !0), $.characterData && P.removeEventListener("DOMCharacterDataModified", this, !0), $.childList && P.removeEventListener("DOMNodeInserted", this, !0), ($.childList || $.subtree) && P.removeEventListener("DOMNodeRemoved", this, !0);
        }, addTransientObserver: function(P) {
          if (P !== this.target) {
            this.addListeners_(P), this.transientObservedNodes.push(P);
            var $ = a.get(P);
            $ || a.set(P, $ = []), $.push(this);
          }
        }, removeTransientObservers: function() {
          var P = this.transientObservedNodes;
          this.transientObservedNodes = [], P.forEach(function($) {
            this.removeListeners_($);
            for (var V = a.get($), q = 0; q < V.length; q++)
              if (V[q] === this) {
                V.splice(q, 1);
                break;
              }
          }, this);
        }, handleEvent: function(P) {
          switch (P.stopImmediatePropagation(), P.type) {
            case "DOMAttrModified":
              var $ = P.attrName, V = P.relatedNode.namespaceURI, q = P.target;
              (re = new S("attributes", q)).attributeName = $, re.attributeNamespace = V;
              var ee = null;
              typeof MutationEvent < "u" && P.attrChange === MutationEvent.ADDITION || (ee = P.prevValue), C(q, function(G) {
                if (G.attributes && (!G.attributeFilter || !G.attributeFilter.length || G.attributeFilter.indexOf($) !== -1 || G.attributeFilter.indexOf(V) !== -1))
                  return G.attributeOldValue ? O(ee) : re;
              });
              break;
            case "DOMCharacterDataModified":
              var re = S("characterData", q = P.target);
              ee = P.prevValue, C(q, function(G) {
                if (G.characterData)
                  return G.characterDataOldValue ? O(ee) : re;
              });
              break;
            case "DOMNodeRemoved":
              this.addTransientObserver(P.target);
            case "DOMNodeInserted":
              q = P.relatedNode;
              var ye, ce, Q = P.target;
              P.type === "DOMNodeInserted" ? (ye = [Q], ce = []) : (ye = [], ce = [Q]);
              var se = Q.previousSibling, fe = Q.nextSibling;
              (re = S("childList", q)).addedNodes = ye, re.removedNodes = ce, re.previousSibling = se, re.nextSibling = fe, C(q, function(G) {
                if (G.childList)
                  return re;
              });
          }
          L = A = void 0;
        } }, t || (t = D), f.exports = t;
      }, 7588: function(f) {
        var t = function(n) {
          var r, l = Object.prototype, a = l.hasOwnProperty, e = typeof Symbol == "function" ? Symbol : {}, g = e.iterator || "@@iterator", _ = e.asyncIterator || "@@asyncIterator", y = e.toStringTag || "@@toStringTag";
          function x(G, K, de) {
            return Object.defineProperty(G, K, { value: de, enumerable: !0, configurable: !0, writable: !0 }), G[K];
          }
          try {
            x({}, "");
          } catch {
            x = function(K, de, ve) {
              return K[de] = ve;
            };
          }
          function E(G, K, de, ve) {
            var ae = K && K.prototype instanceof S ? K : S, J = Object.create(ae.prototype), U = new Q(ve || []);
            return J._invoke = function(X, ne, we) {
              var Oe = L;
              return function(Xe, Ye) {
                if (Oe === I)
                  throw new Error("Generator is already running");
                if (Oe === D) {
                  if (Xe === "throw")
                    throw Ye;
                  return fe();
                }
                for (we.method = Xe, we.arg = Ye; ; ) {
                  var Pe = we.delegate;
                  if (Pe) {
                    var Ve = re(Pe, we);
                    if (Ve) {
                      if (Ve === w)
                        continue;
                      return Ve;
                    }
                  }
                  if (we.method === "next")
                    we.sent = we._sent = we.arg;
                  else if (we.method === "throw") {
                    if (Oe === L)
                      throw Oe = D, we.arg;
                    we.dispatchException(we.arg);
                  } else
                    we.method === "return" && we.abrupt("return", we.arg);
                  Oe = I;
                  var Ze = C(X, ne, we);
                  if (Ze.type === "normal") {
                    if (Oe = we.done ? D : A, Ze.arg === w)
                      continue;
                    return { value: Ze.arg, done: we.done };
                  }
                  Ze.type === "throw" && (Oe = D, we.method = "throw", we.arg = Ze.arg);
                }
              };
            }(G, de, U), J;
          }
          function C(G, K, de) {
            try {
              return { type: "normal", arg: G.call(K, de) };
            } catch (ve) {
              return { type: "throw", arg: ve };
            }
          }
          n.wrap = E;
          var L = "suspendedStart", A = "suspendedYield", I = "executing", D = "completed", w = {};
          function S() {
          }
          function O() {
          }
          function F() {
          }
          var j = {};
          x(j, g, function() {
            return this;
          });
          var P = Object.getPrototypeOf, $ = P && P(P(se([])));
          $ && $ !== l && a.call($, g) && (j = $);
          var V = F.prototype = S.prototype = Object.create(j);
          function q(G) {
            ["next", "throw", "return"].forEach(function(K) {
              x(G, K, function(de) {
                return this._invoke(K, de);
              });
            });
          }
          function ee(G, K) {
            function de(ae, J, U, X) {
              var ne = C(G[ae], G, J);
              if (ne.type !== "throw") {
                var we = ne.arg, Oe = we.value;
                return Oe && typeof Oe == "object" && a.call(Oe, "__await") ? K.resolve(Oe.__await).then(function(Xe) {
                  de("next", Xe, U, X);
                }, function(Xe) {
                  de("throw", Xe, U, X);
                }) : K.resolve(Oe).then(function(Xe) {
                  we.value = Xe, U(we);
                }, function(Xe) {
                  return de("throw", Xe, U, X);
                });
              }
              X(ne.arg);
            }
            var ve;
            this._invoke = function(ae, J) {
              function U() {
                return new K(function(X, ne) {
                  de(ae, J, X, ne);
                });
              }
              return ve = ve ? ve.then(U, U) : U();
            };
          }
          function re(G, K) {
            var de = G.iterator[K.method];
            if (de === r) {
              if (K.delegate = null, K.method === "throw") {
                if (G.iterator.return && (K.method = "return", K.arg = r, re(G, K), K.method === "throw"))
                  return w;
                K.method = "throw", K.arg = new TypeError("The iterator does not provide a 'throw' method");
              }
              return w;
            }
            var ve = C(de, G.iterator, K.arg);
            if (ve.type === "throw")
              return K.method = "throw", K.arg = ve.arg, K.delegate = null, w;
            var ae = ve.arg;
            return ae ? ae.done ? (K[G.resultName] = ae.value, K.next = G.nextLoc, K.method !== "return" && (K.method = "next", K.arg = r), K.delegate = null, w) : ae : (K.method = "throw", K.arg = new TypeError("iterator result is not an object"), K.delegate = null, w);
          }
          function ye(G) {
            var K = { tryLoc: G[0] };
            1 in G && (K.catchLoc = G[1]), 2 in G && (K.finallyLoc = G[2], K.afterLoc = G[3]), this.tryEntries.push(K);
          }
          function ce(G) {
            var K = G.completion || {};
            K.type = "normal", delete K.arg, G.completion = K;
          }
          function Q(G) {
            this.tryEntries = [{ tryLoc: "root" }], G.forEach(ye, this), this.reset(!0);
          }
          function se(G) {
            if (G) {
              var K = G[g];
              if (K)
                return K.call(G);
              if (typeof G.next == "function")
                return G;
              if (!isNaN(G.length)) {
                var de = -1, ve = function ae() {
                  for (; ++de < G.length; )
                    if (a.call(G, de))
                      return ae.value = G[de], ae.done = !1, ae;
                  return ae.value = r, ae.done = !0, ae;
                };
                return ve.next = ve;
              }
            }
            return { next: fe };
          }
          function fe() {
            return { value: r, done: !0 };
          }
          return O.prototype = F, x(V, "constructor", F), x(F, "constructor", O), O.displayName = x(F, y, "GeneratorFunction"), n.isGeneratorFunction = function(G) {
            var K = typeof G == "function" && G.constructor;
            return !!K && (K === O || (K.displayName || K.name) === "GeneratorFunction");
          }, n.mark = function(G) {
            return Object.setPrototypeOf ? Object.setPrototypeOf(G, F) : (G.__proto__ = F, x(G, y, "GeneratorFunction")), G.prototype = Object.create(V), G;
          }, n.awrap = function(G) {
            return { __await: G };
          }, q(ee.prototype), x(ee.prototype, _, function() {
            return this;
          }), n.AsyncIterator = ee, n.async = function(G, K, de, ve, ae) {
            ae === void 0 && (ae = Promise);
            var J = new ee(E(G, K, de, ve), ae);
            return n.isGeneratorFunction(K) ? J : J.next().then(function(U) {
              return U.done ? U.value : J.next();
            });
          }, q(V), x(V, y, "Generator"), x(V, g, function() {
            return this;
          }), x(V, "toString", function() {
            return "[object Generator]";
          }), n.keys = function(G) {
            var K = [];
            for (var de in G)
              K.push(de);
            return K.reverse(), function ve() {
              for (; K.length; ) {
                var ae = K.pop();
                if (ae in G)
                  return ve.value = ae, ve.done = !1, ve;
              }
              return ve.done = !0, ve;
            };
          }, n.values = se, Q.prototype = { constructor: Q, reset: function(G) {
            if (this.prev = 0, this.next = 0, this.sent = this._sent = r, this.done = !1, this.delegate = null, this.method = "next", this.arg = r, this.tryEntries.forEach(ce), !G)
              for (var K in this)
                K.charAt(0) === "t" && a.call(this, K) && !isNaN(+K.slice(1)) && (this[K] = r);
          }, stop: function() {
            this.done = !0;
            var G = this.tryEntries[0].completion;
            if (G.type === "throw")
              throw G.arg;
            return this.rval;
          }, dispatchException: function(G) {
            if (this.done)
              throw G;
            var K = this;
            function de(ne, we) {
              return J.type = "throw", J.arg = G, K.next = ne, we && (K.method = "next", K.arg = r), !!we;
            }
            for (var ve = this.tryEntries.length - 1; ve >= 0; --ve) {
              var ae = this.tryEntries[ve], J = ae.completion;
              if (ae.tryLoc === "root")
                return de("end");
              if (ae.tryLoc <= this.prev) {
                var U = a.call(ae, "catchLoc"), X = a.call(ae, "finallyLoc");
                if (U && X) {
                  if (this.prev < ae.catchLoc)
                    return de(ae.catchLoc, !0);
                  if (this.prev < ae.finallyLoc)
                    return de(ae.finallyLoc);
                } else if (U) {
                  if (this.prev < ae.catchLoc)
                    return de(ae.catchLoc, !0);
                } else {
                  if (!X)
                    throw new Error("try statement without catch or finally");
                  if (this.prev < ae.finallyLoc)
                    return de(ae.finallyLoc);
                }
              }
            }
          }, abrupt: function(G, K) {
            for (var de = this.tryEntries.length - 1; de >= 0; --de) {
              var ve = this.tryEntries[de];
              if (ve.tryLoc <= this.prev && a.call(ve, "finallyLoc") && this.prev < ve.finallyLoc) {
                var ae = ve;
                break;
              }
            }
            ae && (G === "break" || G === "continue") && ae.tryLoc <= K && K <= ae.finallyLoc && (ae = null);
            var J = ae ? ae.completion : {};
            return J.type = G, J.arg = K, ae ? (this.method = "next", this.next = ae.finallyLoc, w) : this.complete(J);
          }, complete: function(G, K) {
            if (G.type === "throw")
              throw G.arg;
            return G.type === "break" || G.type === "continue" ? this.next = G.arg : G.type === "return" ? (this.rval = this.arg = G.arg, this.method = "return", this.next = "end") : G.type === "normal" && K && (this.next = K), w;
          }, finish: function(G) {
            for (var K = this.tryEntries.length - 1; K >= 0; --K) {
              var de = this.tryEntries[K];
              if (de.finallyLoc === G)
                return this.complete(de.completion, de.afterLoc), ce(de), w;
            }
          }, catch: function(G) {
            for (var K = this.tryEntries.length - 1; K >= 0; --K) {
              var de = this.tryEntries[K];
              if (de.tryLoc === G) {
                var ve = de.completion;
                if (ve.type === "throw") {
                  var ae = ve.arg;
                  ce(de);
                }
                return ae;
              }
            }
            throw new Error("illegal catch attempt");
          }, delegateYield: function(G, K, de) {
            return this.delegate = { iterator: se(G), resultName: K, nextLoc: de }, this.method === "next" && (this.arg = r), w;
          } }, n;
        }(f.exports);
        try {
          regeneratorRuntime = t;
        } catch {
          typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
        }
      }, 8702: function(f, t, n) {
        n.d(t, { Z: function() {
          return ve;
        } });
        var r = n(4296), l = n(6464), a = n(6881), e = n(2942), g = n(7003), _ = n(3379), y = n.n(_), x = n(7795), E = n.n(x), C = n(569), L = n.n(C), A = n(3565), I = n.n(A), D = n(9216), w = n.n(D), S = n(4589), O = n.n(S), F = n(5313), j = {};
        F.Z && F.Z.locals && (j.locals = F.Z.locals);
        var P, $ = 0, V = {};
        V.styleTagTransform = O(), V.setAttributes = I(), V.insert = L().bind(null, "head"), V.domAPI = E(), V.insertStyleElement = w(), j.use = function(ae) {
          return V.options = ae || {}, $++ || (P = y()(F.Z, V)), j;
        }, j.unuse = function() {
          $ > 0 && !--$ && (P(), P = null);
        };
        var q = j;
        function ee(ae) {
          var J, U;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), (0, e.Ljt)(U, "d", "M599.99999 832.000004h47.999999a24 24 0 0 0 23.999999-24V376.000013a24 24 0 0 0-23.999999-24h-47.999999a24 24 0 0 0-24 24v431.999991a24 24 0 0 0 24 24zM927.999983 160.000017h-164.819997l-67.999998-113.399998A95.999998 95.999998 0 0 0 612.819989 0.00002H411.179993a95.999998 95.999998 0 0 0-82.319998 46.599999L260.819996 160.000017H95.999999A31.999999 31.999999 0 0 0 64 192.000016v32a31.999999 31.999999 0 0 0 31.999999 31.999999h32v671.999987a95.999998 95.999998 0 0 0 95.999998 95.999998h575.999989a95.999998 95.999998 0 0 0 95.999998-95.999998V256.000015h31.999999a31.999999 31.999999 0 0 0 32-31.999999V192.000016a31.999999 31.999999 0 0 0-32-31.999999zM407.679993 101.820018A12 12 0 0 1 417.999993 96.000018h187.999996a12 12 0 0 1 10.3 5.82L651.219989 160.000017H372.779994zM799.999986 928.000002H223.999997V256.000015h575.999989z m-423.999992-95.999998h47.999999a24 24 0 0 0 24-24V376.000013a24 24 0 0 0-24-24h-47.999999a24 24 0 0 0-24 24v431.999991a24 24 0 0 0 24 24z"), (0, e.Ljt)(J, "class", "vc-icon-delete"), (0, e.Ljt)(J, "viewBox", "0 0 1024 1024"), (0, e.Ljt)(J, "width", "200"), (0, e.Ljt)(J, "height", "200");
          }, m: function(X, ne) {
            (0, e.$Tr)(X, J, ne), (0, e.R3I)(J, U);
          }, d: function(X) {
            X && (0, e.ogt)(J);
          } };
        }
        function re(ae) {
          var J, U, X;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), X = (0, e.bi5)("path"), (0, e.Ljt)(U, "d", "M874.154197 150.116875A511.970373 511.970373 0 1 0 1023.993986 511.991687a511.927744 511.927744 0 0 0-149.839789-361.874812z m-75.324866 648.382129A405.398688 405.398688 0 1 1 917.422301 511.991687a405.313431 405.313431 0 0 1-118.59297 286.507317z"), (0, e.Ljt)(X, "d", "M725.039096 299.274605a54.351559 54.351559 0 0 0-76.731613 0l-135.431297 135.431297L377.274375 299.274605a54.436817 54.436817 0 0 0-76.944756 76.987385l135.388668 135.431297-135.388668 135.473925a54.436817 54.436817 0 0 0 76.944756 76.987385l135.388668-135.431297 135.431297 135.473926a54.436817 54.436817 0 0 0 76.731613-76.987385l-135.388668-135.473926 135.388668-135.431296a54.479445 54.479445 0 0 0 0.213143-77.030014z"), (0, e.Ljt)(J, "viewBox", "0 0 1024 1024"), (0, e.Ljt)(J, "width", "200"), (0, e.Ljt)(J, "height", "200");
          }, m: function(ne, we) {
            (0, e.$Tr)(ne, J, we), (0, e.R3I)(J, U), (0, e.R3I)(J, X);
          }, d: function(ne) {
            ne && (0, e.ogt)(J);
          } };
        }
        function ye(ae) {
          var J, U;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), (0, e.Ljt)(U, "fill-rule", "evenodd"), (0, e.Ljt)(U, "d", "M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"), (0, e.Ljt)(J, "class", "vc-icon-copy"), (0, e.Ljt)(J, "viewBox", "0 0 16 16");
          }, m: function(X, ne) {
            (0, e.$Tr)(X, J, ne), (0, e.R3I)(J, U);
          }, d: function(X) {
            X && (0, e.ogt)(J);
          } };
        }
        function ce(ae) {
          var J, U;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), (0, e.Ljt)(U, "fill-rule", "evenodd"), (0, e.Ljt)(U, "d", "M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"), (0, e.Ljt)(J, "class", "vc-icon-suc"), (0, e.Ljt)(J, "viewBox", "0 0 16 16");
          }, m: function(X, ne) {
            (0, e.$Tr)(X, J, ne), (0, e.R3I)(J, U);
          }, d: function(X) {
            X && (0, e.ogt)(J);
          } };
        }
        function Q(ae) {
          var J, U, X;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), X = (0, e.bi5)("path"), (0, e.Ljt)(U, "d", "M776.533333 1024 162.133333 1024C72.533333 1024 0 951.466667 0 861.866667L0 247.466667C0 157.866667 72.533333 85.333333 162.133333 85.333333L469.333333 85.333333c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666667L162.133333 170.666667C119.466667 170.666667 85.333333 204.8 85.333333 247.466667l0 610.133333c0 42.666667 34.133333 76.8 76.8 76.8l610.133333 0c42.666667 0 76.8-34.133333 76.8-76.8L849.066667 554.666667c0-25.6 17.066667-42.666667 42.666667-42.666667s42.666667 17.066667 42.666667 42.666667l0 307.2C938.666667 951.466667 866.133333 1024 776.533333 1024z"), (0, e.Ljt)(X, "d", "M256 810.666667c-12.8 0-21.333333-4.266667-29.866667-12.8C217.6 789.333333 213.333333 772.266667 213.333333 759.466667l42.666667-213.333333c0-8.533333 4.266667-17.066667 12.8-21.333333l512-512c17.066667-17.066667 42.666667-17.066667 59.733333 0l170.666667 170.666667c17.066667 17.066667 17.066667 42.666667 0 59.733333l-512 512c-4.266667 4.266667-12.8 8.533333-21.333333 12.8l-213.333333 42.666667C260.266667 810.666667 260.266667 810.666667 256 810.666667zM337.066667 576l-25.6 136.533333 136.533333-25.6L921.6 213.333333 810.666667 102.4 337.066667 576z"), (0, e.Ljt)(J, "class", "vc-icon-edit"), (0, e.Ljt)(J, "viewBox", "0 0 1024 1024"), (0, e.Ljt)(J, "width", "200"), (0, e.Ljt)(J, "height", "200");
          }, m: function(ne, we) {
            (0, e.$Tr)(ne, J, we), (0, e.R3I)(J, U), (0, e.R3I)(J, X);
          }, d: function(ne) {
            ne && (0, e.ogt)(J);
          } };
        }
        function se(ae) {
          var J, U;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), (0, e.Ljt)(U, "d", "M581.338005 987.646578c-2.867097 4.095853-4.573702 8.669555-8.191705 12.287558a83.214071 83.214071 0 0 1-60.959939 24.029001 83.214071 83.214071 0 0 1-61.028203-24.029001c-3.618003-3.618003-5.324608-8.191705-8.123441-12.15103L24.370323 569.050448a83.418864 83.418864 0 0 1 117.892289-117.89229l369.923749 369.92375L1308.829682 24.438587A83.418864 83.418864 0 0 1 1426.721971 142.194348L581.338005 987.646578z"), (0, e.Ljt)(J, "class", "vc-icon-don"), (0, e.Ljt)(J, "viewBox", "0 0 1501 1024"), (0, e.Ljt)(J, "width", "200"), (0, e.Ljt)(J, "height", "200");
          }, m: function(X, ne) {
            (0, e.$Tr)(X, J, ne), (0, e.R3I)(J, U);
          }, d: function(X) {
            X && (0, e.ogt)(J);
          } };
        }
        function fe(ae) {
          var J, U;
          return { c: function() {
            J = (0, e.bi5)("svg"), U = (0, e.bi5)("path"), (0, e.Ljt)(U, "d", "M894.976 574.464q0 78.848-29.696 148.48t-81.408 123.392-121.856 88.064-151.04 41.472q-5.12 1.024-9.216 1.536t-9.216 0.512l-177.152 0q-17.408 0-34.304-6.144t-30.208-16.896-22.016-25.088-8.704-29.696 8.192-29.696 21.504-24.576 29.696-16.384 33.792-6.144l158.72 1.024q54.272 0 102.4-19.968t83.968-53.76 56.32-79.36 20.48-97.792q0-49.152-18.432-92.16t-50.688-76.8-75.264-54.784-93.184-26.112q-2.048 0-2.56 0.512t-2.56 0.512l-162.816 0 0 80.896q0 17.408-13.824 25.6t-44.544-10.24q-8.192-5.12-26.112-17.92t-41.984-30.208-50.688-36.864l-51.2-38.912q-15.36-12.288-26.624-22.016t-11.264-24.064q0-12.288 12.8-25.6t29.184-26.624q18.432-15.36 44.032-35.84t50.688-39.936 45.056-35.328 28.16-22.016q24.576-17.408 39.936-7.168t16.384 30.72l0 81.92 162.816 0q5.12 0 10.752 1.024t10.752 2.048q79.872 8.192 149.504 41.984t121.344 87.552 80.896 123.392 29.184 147.456z"), (0, e.Ljt)(J, "class", "vc-icon-cancel"), (0, e.Ljt)(J, "viewBox", "0 0 1024 1024"), (0, e.Ljt)(J, "width", "200"), (0, e.Ljt)(J, "height", "200");
          }, m: function(X, ne) {
            (0, e.$Tr)(X, J, ne), (0, e.R3I)(J, U);
          }, d: function(X) {
            X && (0, e.ogt)(J);
          } };
        }
        function G(ae) {
          var J, U, X, ne, we, Oe, Xe, Ye, Pe, Ve = ae[0] === "delete" && ee(), Ze = ae[0] === "clear" && re(), ot = ae[0] === "copy" && ye(), tt = ae[0] === "success" && ce(), Ge = ae[0] === "edit" && Q(), We = ae[0] === "done" && se(), He = ae[0] === "cancel" && fe();
          return { c: function() {
            J = (0, e.bGB)("i"), Ve && Ve.c(), U = (0, e.DhX)(), Ze && Ze.c(), X = (0, e.DhX)(), ot && ot.c(), ne = (0, e.DhX)(), tt && tt.c(), we = (0, e.DhX)(), Ge && Ge.c(), Oe = (0, e.DhX)(), We && We.c(), Xe = (0, e.DhX)(), He && He.c(), (0, e.Ljt)(J, "class", "vc-icon");
          }, m: function(ft, Tt) {
            (0, e.$Tr)(ft, J, Tt), Ve && Ve.m(J, null), (0, e.R3I)(J, U), Ze && Ze.m(J, null), (0, e.R3I)(J, X), ot && ot.m(J, null), (0, e.R3I)(J, ne), tt && tt.m(J, null), (0, e.R3I)(J, we), Ge && Ge.m(J, null), (0, e.R3I)(J, Oe), We && We.m(J, null), (0, e.R3I)(J, Xe), He && He.m(J, null), Ye || (Pe = (0, e.oLt)(J, "click", ae[1]), Ye = !0);
          }, p: function(ft, Tt) {
            Tt[0], ft[0] === "delete" ? Ve || ((Ve = ee()).c(), Ve.m(J, U)) : Ve && (Ve.d(1), Ve = null), ft[0] === "clear" ? Ze || ((Ze = re()).c(), Ze.m(J, X)) : Ze && (Ze.d(1), Ze = null), ft[0] === "copy" ? ot || ((ot = ye()).c(), ot.m(J, ne)) : ot && (ot.d(1), ot = null), ft[0] === "success" ? tt || ((tt = ce()).c(), tt.m(J, we)) : tt && (tt.d(1), tt = null), ft[0] === "edit" ? Ge || ((Ge = Q()).c(), Ge.m(J, Oe)) : Ge && (Ge.d(1), Ge = null), ft[0] === "done" ? We || ((We = se()).c(), We.m(J, Xe)) : We && (We.d(1), We = null), ft[0] === "cancel" ? He || ((He = fe()).c(), He.m(J, null)) : He && (He.d(1), He = null);
          }, i: e.ZTd, o: e.ZTd, d: function(ft) {
            ft && (0, e.ogt)(J), Ve && Ve.d(), Ze && Ze.d(), ot && ot.d(), tt && tt.d(), Ge && Ge.d(), We && We.d(), He && He.d(), Ye = !1, Pe();
          } };
        }
        function K(ae, J, U) {
          var X = J.name;
          return (0, g.H3)(function() {
            q.use();
          }), (0, g.ev)(function() {
            q.unuse();
          }), ae.$$set = function(ne) {
            "name" in ne && U(0, X = ne.name);
          }, [X, function(ne) {
            e.cKT.call(this, ae, ne);
          }];
        }
        var de = function(ae) {
          function J(U) {
            var X;
            return X = ae.call(this) || this, (0, e.S1n)((0, l.Z)(X), U, K, G, e.N8, { name: 0 }), X;
          }
          return (0, a.Z)(J, ae), (0, r.Z)(J, [{ key: "name", get: function() {
            return this.$$.ctx[0];
          }, set: function(U) {
            this.$$set({ name: U }), (0, e.yl1)();
          } }]), J;
        }(e.f_C), ve = de;
      }, 3903: function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
        var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6464), _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6881), svelte_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2942), svelte__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7003), _component_icon_icon_svelte__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8702), _logTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8665), _log_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5629), _logCommand_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3411);
        function get_each_context(f, t, n) {
          var r = f.slice();
          return r[28] = t[n], r;
        }
        function create_if_block_2(f) {
          var t, n, r;
          return { c: function() {
            (t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("li")).textContent = "Close", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(t, "class", "vc-cmd-prompted-hide");
          }, m: function(l, a) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(l, t, a), n || (r = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(t, "click", f[5]), n = !0);
          }, p: svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ZTd, d: function(l) {
            l && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t), n = !1, r();
          } };
        }
        function create_else_block(f) {
          var t;
          return { c: function() {
            (t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("li")).textContent = "No Prompted";
          }, m: function(n, r) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(n, t, r);
          }, p: svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ZTd, d: function(n) {
            n && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t);
          } };
        }
        function create_each_block(f) {
          var t, n, r, l, a = f[28].text + "";
          function e() {
            return f[14](f[28]);
          }
          return { c: function() {
            t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("li"), n = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.fLW)(a);
          }, m: function(g, _) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(g, t, _), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, n), r || (l = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(t, "click", e), r = !0);
          }, p: function(g, _) {
            f = g, 8 & _ && a !== (a = f[28].text + "") && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.rTO)(n, a);
          }, d: function(g) {
            g && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t), r = !1, l();
          } };
        }
        function create_if_block_1(f) {
          var t, n, r, l, a;
          return n = new _component_icon_icon_svelte__WEBPACK_IMPORTED_MODULE_2__.Z({ props: { name: "clear" } }), { c: function() {
            t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("div"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.YCL)(n.$$.fragment), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(t, "class", "vc-cmd-clear-btn");
          }, m: function(e, g) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(e, t, g), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.yef)(n, t, null), r = !0, l || (a = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(t, "click", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.AT7)(f[17])), l = !0);
          }, p: svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ZTd, i: function(e) {
            r || ((0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(n.$$.fragment, e), r = !0);
          }, o: function(e) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(n.$$.fragment, e), r = !1;
          }, d: function(e) {
            e && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.vpE)(n), l = !1, a();
          } };
        }
        function create_if_block(f) {
          var t, n, r, l, a;
          return n = new _component_icon_icon_svelte__WEBPACK_IMPORTED_MODULE_2__.Z({ props: { name: "clear" } }), { c: function() {
            t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("div"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.YCL)(n.$$.fragment), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(t, "class", "vc-cmd-clear-btn");
          }, m: function(e, g) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(e, t, g), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.yef)(n, t, null), r = !0, l || (a = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(t, "click", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.AT7)(f[19])), l = !0);
          }, p: svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ZTd, i: function(e) {
            r || ((0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(n.$$.fragment, e), r = !0);
          }, o: function(e) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(n.$$.fragment, e), r = !1;
          }, d: function(e) {
            e && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.vpE)(n), l = !1, a();
          } };
        }
        function create_fragment(f) {
          for (var t, n, r, l, a, e, g, _, y, x, E, C, L, A, I, D, w, S, O, F, j, P = f[3].length > 0 && create_if_block_2(f), $ = f[3], V = [], q = 0; q < $.length; q += 1)
            V[q] = create_each_block(get_each_context(f, $, q));
          var ee = null;
          $.length || (ee = create_else_block());
          var re = f[1].length > 0 && create_if_block_1(f), ye = f[4].length > 0 && create_if_block(f);
          return { c: function() {
            t = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("form"), n = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("ul"), P && P.c(), r = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)();
            for (var ce = 0; ce < V.length; ce += 1)
              V[ce].c();
            ee && ee.c(), l = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), a = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("div"), e = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("textarea"), g = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), re && re.c(), _ = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), (y = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("button")).textContent = "OK", x = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), E = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("form"), C = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("ul"), L = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), A = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("div"), I = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("textarea"), D = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), ye && ye.c(), w = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.DhX)(), (S = (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.bGB)("button")).textContent = "Filter", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(n, "class", "vc-cmd-prompted"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(n, "style", f[2]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(e, "class", "vc-cmd-input"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(e, "placeholder", "command..."), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(a, "class", "vc-cmd-input-wrap"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(y, "class", "vc-cmd-btn"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(y, "type", "submit"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(t, "class", "vc-cmd"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(C, "class", "vc-cmd-prompted"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(I, "class", "vc-cmd-input"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(I, "placeholder", "filter..."), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(A, "class", "vc-cmd-input-wrap"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(S, "class", "vc-cmd-btn"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(S, "type", "submit"), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(E, "class", "vc-cmd vc-filter");
          }, m: function(ce, Q) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(ce, t, Q), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, n), P && P.m(n, null), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(n, r);
            for (var se = 0; se < V.length; se += 1)
              V[se].m(n, null);
            ee && ee.m(n, null), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, l), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, a), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(a, e), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.BmG)(e, f[1]), f[16](e), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(a, g), re && re.m(a, null), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, _), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(t, y), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(ce, x, Q), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.$Tr)(ce, E, Q), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(E, C), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(E, L), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(E, A), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(A, I), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.BmG)(I, f[4]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(A, D), ye && ye.m(A, null), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(E, w), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.R3I)(E, S), O = !0, F || (j = [(0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(e, "input", f[15]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(e, "keydown", f[10]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(e, "keyup", f[11]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(e, "focus", f[8]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(e, "blur", f[9]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(t, "submit", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.AT7)(f[12])), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(I, "input", f[18]), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.oLt)(E, "submit", (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.AT7)(f[13]))], F = !0);
          }, p: function(ce, Q) {
            var se = Q[0];
            if (ce[3].length > 0 ? P ? P.p(ce, se) : ((P = create_if_block_2(ce)).c(), P.m(n, r)) : P && (P.d(1), P = null), 136 & se) {
              var fe;
              for ($ = ce[3], fe = 0; fe < $.length; fe += 1) {
                var G = get_each_context(ce, $, fe);
                V[fe] ? V[fe].p(G, se) : (V[fe] = create_each_block(G), V[fe].c(), V[fe].m(n, null));
              }
              for (; fe < V.length; fe += 1)
                V[fe].d(1);
              V.length = $.length, !$.length && ee ? ee.p(ce, se) : $.length ? ee && (ee.d(1), ee = null) : ((ee = create_else_block()).c(), ee.m(n, null));
            }
            (!O || 4 & se) && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ljt)(n, "style", ce[2]), 2 & se && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.BmG)(e, ce[1]), ce[1].length > 0 ? re ? (re.p(ce, se), 2 & se && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(re, 1)) : ((re = create_if_block_1(ce)).c(), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(re, 1), re.m(a, null)) : re && ((0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.dvw)(), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(re, 1, 1, function() {
              re = null;
            }), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.gbL)()), 16 & se && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.BmG)(I, ce[4]), ce[4].length > 0 ? ye ? (ye.p(ce, se), 16 & se && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(ye, 1)) : ((ye = create_if_block(ce)).c(), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(ye, 1), ye.m(A, null)) : ye && ((0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.dvw)(), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(ye, 1, 1, function() {
              ye = null;
            }), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.gbL)());
          }, i: function(ce) {
            O || ((0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(re), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.Ui)(ye), O = !0);
          }, o: function(ce) {
            (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(re), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.etI)(ye), O = !1;
          }, d: function(ce) {
            ce && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(t), P && P.d(), (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.RMB)(V, ce), ee && ee.d(), f[16](null), re && re.d(), ce && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(x), ce && (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.ogt)(E), ye && ye.d(), F = !1, (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.j7q)(j);
          } };
        }
        function instance($$self, $$props, $$invalidate) {
          var module = _log_model__WEBPACK_IMPORTED_MODULE_3__.W.getSingleton(_log_model__WEBPACK_IMPORTED_MODULE_3__.W, "VConsoleLogModel"), cachedObjKeys = {}, dispatch = (0, svelte__WEBPACK_IMPORTED_MODULE_1__.x)(), cmdElement, cmdValue = "", promptedStyle = "", promptedList = [], filterValue = "";
          (0, svelte__WEBPACK_IMPORTED_MODULE_1__.H3)(function() {
            _logCommand_less__WEBPACK_IMPORTED_MODULE_4__.Z.use();
          }), (0, svelte__WEBPACK_IMPORTED_MODULE_1__.ev)(function() {
            _logCommand_less__WEBPACK_IMPORTED_MODULE_4__.Z.unuse();
          });
          var evalCommand = function(f) {
            module.evalCommand(f);
          }, moveCursorToPos = function(f, t) {
            f.setSelectionRange && setTimeout(function() {
              f.setSelectionRange(t, t);
            }, 1);
          }, clearPromptedList = function() {
            $$invalidate(2, promptedStyle = "display: none;"), $$invalidate(3, promptedList = []);
          }, updatePromptedList = function updatePromptedList(identifier) {
            if (cmdValue !== "") {
              identifier || (identifier = (0, _logTool__WEBPACK_IMPORTED_MODULE_5__.oj)(cmdValue));
              var objName = "window", keyName = cmdValue;
              if (identifier.front.text !== "." && identifier.front.text !== "[" || (objName = identifier.front.before, keyName = identifier.back.text !== "" ? identifier.back.before : identifier.front.after), keyName = keyName.replace(/(^['"]+)|(['"']+$)/g, ""), !cachedObjKeys[objName])
                try {
                  cachedObjKeys[objName] = Object.getOwnPropertyNames(eval("(" + objName + ")")).sort();
                } catch (f) {
                }
              try {
                if (cachedObjKeys[objName])
                  for (var i = 0; i < cachedObjKeys[objName].length && !(promptedList.length >= 100); i++) {
                    var key = String(cachedObjKeys[objName][i]), keyPattern = new RegExp("^" + keyName, "i");
                    if (keyPattern.test(key)) {
                      var completeCmd = objName;
                      identifier.front.text === "." || identifier.front.text === "" ? completeCmd += "." + key : identifier.front.text === "[" && (completeCmd += "['" + key + "']"), promptedList.push({ text: key, value: completeCmd });
                    }
                  }
              } catch (f) {
              }
              if (promptedList.length > 0) {
                var m = Math.min(200, 31 * (promptedList.length + 1));
                $$invalidate(2, promptedStyle = "display: block; height: " + m + "px; margin-top: " + (-m - 2) + "px;"), $$invalidate(3, promptedList);
              } else
                clearPromptedList();
            } else
              clearPromptedList();
          }, autoCompleteBrackets = function(f, t) {
            if (!(t === 8 || t === 46) && f.front.after === "")
              switch (f.front.text) {
                case "[":
                  return $$invalidate(1, cmdValue += "]"), void moveCursorToPos(cmdElement, cmdValue.length - 1);
                case "(":
                  return $$invalidate(1, cmdValue += ")"), void moveCursorToPos(cmdElement, cmdValue.length - 1);
                case "{":
                  return $$invalidate(1, cmdValue += "}"), void moveCursorToPos(cmdElement, cmdValue.length - 1);
              }
          }, dispatchFilterEvent = function() {
            dispatch("filterText", { filterText: filterValue });
          }, onTapClearText = function(f) {
            f === "cmd" ? ($$invalidate(1, cmdValue = ""), clearPromptedList()) : f === "filter" && ($$invalidate(4, filterValue = ""), dispatchFilterEvent());
          }, onTapPromptedItem = function onTapPromptedItem(item) {
            var type = "";
            try {
              type = eval("typeof " + item.value);
            } catch (f) {
            }
            $$invalidate(1, cmdValue = item.value + (type === "function" ? "()" : "")), clearPromptedList();
          }, onCmdFocus = function() {
            updatePromptedList();
          }, onCmdBlur = function() {
          }, onCmdKeyDown = function(f) {
            f.keyCode === 13 && (f.preventDefault(), onCmdSubmit());
          }, onCmdKeyUp = function(f) {
            $$invalidate(3, promptedList = []);
            var t = (0, _logTool__WEBPACK_IMPORTED_MODULE_5__.oj)(f.target.value);
            autoCompleteBrackets(t, f.keyCode), updatePromptedList(t);
          }, onCmdSubmit = function() {
            cmdValue !== "" && evalCommand(cmdValue), clearPromptedList();
          }, onFilterSubmit = function(f) {
            dispatchFilterEvent();
          }, click_handler = function(f) {
            return onTapPromptedItem(f);
          };
          function textarea0_input_handler() {
            cmdValue = this.value, $$invalidate(1, cmdValue);
          }
          function textarea0_binding(f) {
            svelte_internal__WEBPACK_IMPORTED_MODULE_0__.VnY[f ? "unshift" : "push"](function() {
              $$invalidate(0, cmdElement = f);
            });
          }
          var click_handler_1 = function() {
            return onTapClearText("cmd");
          };
          function textarea1_input_handler() {
            filterValue = this.value, $$invalidate(4, filterValue);
          }
          var click_handler_2 = function() {
            return onTapClearText("filter");
          };
          return [cmdElement, cmdValue, promptedStyle, promptedList, filterValue, clearPromptedList, onTapClearText, onTapPromptedItem, onCmdFocus, onCmdBlur, onCmdKeyDown, onCmdKeyUp, onCmdSubmit, onFilterSubmit, click_handler, textarea0_input_handler, textarea0_binding, click_handler_1, textarea1_input_handler, click_handler_2];
        }
        var LogCommand = function(f) {
          function t(n) {
            var r;
            return r = f.call(this) || this, (0, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.S1n)((0, _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_7__.Z)(r), n, instance, create_fragment, svelte_internal__WEBPACK_IMPORTED_MODULE_0__.N8, {}), r;
          }
          return (0, _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_6__.Z)(t, f), t;
        }(svelte_internal__WEBPACK_IMPORTED_MODULE_0__.f_C);
        __webpack_exports__.Z = LogCommand;
      }, 4687: function(f, t, n) {
        n.d(t, { x: function() {
          return l;
        } });
        var r = n(3313), l = function() {
          var a = (0, r.fZ)({ updateTime: 0 }), e = a.subscribe, g = a.set, _ = a.update;
          return { subscribe: e, set: g, update: _, updateTime: function() {
            _(function(y) {
              return y.updateTime = Date.now(), y;
            });
          } };
        }();
      }, 643: function(f, t, n) {
        n.d(t, { N: function() {
          return r;
        } });
        var r = function() {
          function l() {
            this._onDataUpdateCallbacks = [];
          }
          return l.getSingleton = function(a, e) {
            return e || (e = a.toString()), l.singleton[e] || (l.singleton[e] = new a()), l.singleton[e];
          }, l;
        }();
        r.singleton = {};
      }, 5103: function(f, t, n) {
        function r(U) {
          var X = U > 0 ? new Date(U) : /* @__PURE__ */ new Date(), ne = X.getDate() < 10 ? "0" + X.getDate() : X.getDate(), we = X.getMonth() < 9 ? "0" + (X.getMonth() + 1) : X.getMonth() + 1, Oe = X.getFullYear(), Xe = X.getHours() < 10 ? "0" + X.getHours() : X.getHours(), Ye = X.getMinutes() < 10 ? "0" + X.getMinutes() : X.getMinutes(), Pe = X.getSeconds() < 10 ? "0" + X.getSeconds() : X.getSeconds(), Ve = X.getMilliseconds() < 10 ? "0" + X.getMilliseconds() : X.getMilliseconds();
          return Ve < 100 && (Ve = "0" + Ve), { time: +X, year: Oe, month: we, day: ne, hour: Xe, minute: Ye, second: Pe, millisecond: Ve };
        }
        function l(U) {
          return Object.prototype.toString.call(U) === "[object Number]";
        }
        function a(U) {
          return typeof U == "bigint";
        }
        function e(U) {
          return typeof U == "string";
        }
        function g(U) {
          return Object.prototype.toString.call(U) === "[object Array]";
        }
        function _(U) {
          return typeof U == "boolean";
        }
        function y(U) {
          return U === void 0;
        }
        function x(U) {
          return U === null;
        }
        function E(U) {
          return typeof U == "symbol";
        }
        function C(U) {
          return !(Object.prototype.toString.call(U) !== "[object Object]" && (l(U) || a(U) || e(U) || _(U) || g(U) || x(U) || L(U) || y(U) || E(U)));
        }
        function L(U) {
          return typeof U == "function";
        }
        function A(U) {
          return typeof HTMLElement == "object" ? U instanceof HTMLElement : U && typeof U == "object" && U !== null && U.nodeType === 1 && typeof U.nodeName == "string";
        }
        function I(U) {
          var X = Object.prototype.toString.call(U);
          return X === "[object Window]" || X === "[object DOMWindow]" || X === "[object global]";
        }
        function D(U) {
          return U != null && typeof U != "string" && typeof U != "boolean" && typeof U != "number" && typeof U != "function" && typeof U != "symbol" && typeof U != "bigint" && typeof Symbol < "u" && typeof U[Symbol.iterator] == "function";
        }
        function w(U) {
          return Object.prototype.toString.call(U).replace(/\[object (.*)\]/, "$1");
        }
        n.d(t, { C4: function() {
          return a;
        }, DV: function() {
          return O;
        }, FJ: function() {
          return I;
        }, Ft: function() {
          return x;
        }, HD: function() {
          return e;
        }, H_: function() {
          return ae;
        }, KL: function() {
          return re;
        }, Kn: function() {
          return C;
        }, MH: function() {
          return se;
        }, PO: function() {
          return F;
        }, QI: function() {
          return ve;
        }, QK: function() {
          return fe;
        }, TW: function() {
          return D;
        }, _3: function() {
          return r;
        }, _D: function() {
          return G;
        }, cF: function() {
          return de;
        }, hZ: function() {
          return ee;
        }, hj: function() {
          return l;
        }, id: function() {
          return ye;
        }, jn: function() {
          return _;
        }, kJ: function() {
          return g;
        }, kK: function() {
          return A;
        }, mf: function() {
          return L;
        }, o8: function() {
          return y;
        }, po: function() {
          return K;
        }, qr: function() {
          return Q;
        }, qt: function() {
          return J;
        }, rE: function() {
          return $;
        }, yk: function() {
          return E;
        }, zl: function() {
          return w;
        } });
        var S = /(function|class) ([^ \{\()}]{1,})[\(| ]/;
        function O(U) {
          var X;
          if (U == null)
            return "";
          var ne = S.exec((U == null || (X = U.constructor) == null ? void 0 : X.toString()) || "");
          return ne && ne.length > 1 ? ne[2] : "";
        }
        function F(U) {
          var X, ne = Object.prototype.hasOwnProperty;
          if (!U || typeof U != "object" || U.nodeType || I(U))
            return !1;
          try {
            if (U.constructor && !ne.call(U, "constructor") && !ne.call(U.constructor.prototype, "isPrototypeOf"))
              return !1;
          } catch {
            return !1;
          }
          for (X in U)
            ;
          return X === void 0 || ne.call(U, X);
        }
        var j = /[\n\t]/g, P = function(U) {
          return { "\n": "\\n", "	": "\\t" }[U];
        };
        function $(U) {
          return typeof U != "string" ? U : String(U).replace(j, P);
        }
        var V = function(U, X) {
          X === void 0 && (X = 0);
          var ne = "";
          return e(U) ? (X > 0 && (U = ye(U, X)), ne += '"' + $(U) + '"') : E(U) ? ne += String(U).replace(/^Symbol\((.*)\)$/i, 'Symbol("$1")') : L(U) ? ne += (U.name || "function") + "()" : a(U) ? ne += String(U) + "n" : ne += String(U), ne;
        }, q = function U(X, ne, we) {
          if (we === void 0 && (we = 0), C(X) || g(X))
            if (ne.circularFinder(X)) {
              var Oe = "";
              if (g(X))
                Oe = "(Circular Array)";
              else if (C(X)) {
                var Xe;
                Oe = "(Circular " + (((Xe = X.constructor) == null ? void 0 : Xe.name) || "Object") + ")";
              }
              ne.ret += ne.standardJSON ? '"' + Oe + '"' : Oe;
            } else {
              var Ye = "", Pe = "";
              if (ne.pretty) {
                for (var Ve = 0; Ve <= we; Ve++)
                  Ye += "  ";
                Pe = `
`;
              }
              var Ze = "{", ot = "}";
              g(X) && (Ze = "[", ot = "]"), ne.ret += Ze + Pe;
              for (var tt = se(X), Ge = 0; Ge < tt.length; Ge++) {
                var We = tt[Ge];
                ne.ret += Ye;
                try {
                  g(X) || (C(We) || g(We) || E(We) ? ne.ret += Object.prototype.toString.call(We) : e(We) && ne.standardJSON ? ne.ret += '"' + We + '"' : ne.ret += We, ne.ret += ": ");
                } catch {
                  continue;
                }
                try {
                  var He = X[We];
                  if (g(He))
                    ne.maxDepth > -1 && we >= ne.maxDepth ? ne.ret += "Array(" + He.length + ")" : U(He, ne, we + 1);
                  else if (C(He)) {
                    var ft;
                    ne.maxDepth > -1 && we >= ne.maxDepth ? ne.ret += (((ft = He.constructor) == null ? void 0 : ft.name) || "Object") + " {}" : U(He, ne, we + 1);
                  } else
                    ne.ret += V(He, ne.keyMaxLen);
                } catch {
                  ne.ret += ne.standardJSON ? '"(PARSE_ERROR)"' : "(PARSE_ERROR)";
                }
                if (ne.keyMaxLen > 0 && ne.ret.length >= 10 * ne.keyMaxLen) {
                  ne.ret += ", (...)";
                  break;
                }
                Ge < tt.length - 1 && (ne.ret += ", "), ne.ret += Pe;
              }
              ne.ret += Ye.substring(0, Ye.length - 2) + ot;
            }
          else
            ne.ret += V(X, ne.keyMaxLen);
        };
        function ee(U, X) {
          X === void 0 && (X = { maxDepth: -1, keyMaxLen: -1, pretty: !1, standardJSON: !1 });
          var ne, we = Object.assign({ ret: "", maxDepth: -1, keyMaxLen: -1, pretty: !1, standardJSON: !1, circularFinder: (ne = /* @__PURE__ */ new WeakSet(), function(Oe) {
            if (typeof Oe == "object" && Oe !== null) {
              if (ne.has(Oe))
                return !0;
              ne.add(Oe);
            }
            return !1;
          }) }, X);
          return q(U, we), we.ret;
        }
        function re(U) {
          return U <= 0 ? "" : U >= 1e6 ? (U / 1e3 / 1e3).toFixed(1) + " MB" : U >= 1e3 ? (U / 1e3).toFixed(1) + " KB" : U + " B";
        }
        function ye(U, X) {
          return U.length > X && (U = U.substring(0, X) + "...(" + re(function(ne) {
            try {
              return encodeURI(ne).split(/%(?:u[0-9A-F]{2})?[0-9A-F]{2}|./).length - 1;
            } catch {
              return 0;
            }
          }(U)) + ")"), U;
        }
        var ce = function(U, X) {
          return String(U).localeCompare(String(X), void 0, { numeric: !0, sensitivity: "base" });
        };
        function Q(U) {
          return U.sort(ce);
        }
        function se(U) {
          return C(U) || g(U) ? Object.keys(U) : [];
        }
        function fe(U) {
          var X = se(U), ne = function(we) {
            return C(we) || g(we) ? Object.getOwnPropertyNames(we) : [];
          }(U);
          return ne.filter(function(we) {
            return X.indexOf(we) === -1;
          });
        }
        function G(U) {
          return C(U) || g(U) ? Object.getOwnPropertySymbols(U) : [];
        }
        function K(U, X) {
          window.localStorage && (U = "vConsole_" + U, localStorage.setItem(U, X));
        }
        function de(U) {
          if (window.localStorage)
            return U = "vConsole_" + U, localStorage.getItem(U);
        }
        function ve(U) {
          return U === void 0 && (U = ""), "__vc_" + U + Math.random().toString(36).substring(2, 8);
        }
        function ae() {
          return typeof window < "u" && !!window.__wxConfig && !!window.wx && !!window.__virtualDOM__;
        }
        function J(U) {
          if (ae() && typeof window.wx[U] == "function")
            try {
              for (var X, ne = arguments.length, we = new Array(ne > 1 ? ne - 1 : 0), Oe = 1; Oe < ne; Oe++)
                we[Oe - 1] = arguments[Oe];
              var Xe = (X = window.wx[U]).call.apply(X, [window.wx].concat(we));
              return Xe;
            } catch (Ye) {
              return void console.debug("[vConsole] Fail to call wx." + U + "():", Ye);
            }
        }
      }, 5629: function(f, t, n) {
        n.d(t, { W: function() {
          return A;
        } });
        var r = n(8270), l = n(6881), a = n(5103), e = n(643), g = n(4687), _ = n(8665), y = n(9923);
        function x(I, D) {
          var w = Object.keys(I);
          if (Object.getOwnPropertySymbols) {
            var S = Object.getOwnPropertySymbols(I);
            D && (S = S.filter(function(O) {
              return Object.getOwnPropertyDescriptor(I, O).enumerable;
            })), w.push.apply(w, S);
          }
          return w;
        }
        function E(I) {
          for (var D = 1; D < arguments.length; D++) {
            var w = arguments[D] != null ? arguments[D] : {};
            D % 2 ? x(Object(w), !0).forEach(function(S) {
              (0, r.Z)(I, S, w[S]);
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(I, Object.getOwnPropertyDescriptors(w)) : x(Object(w)).forEach(function(S) {
              Object.defineProperty(I, S, Object.getOwnPropertyDescriptor(w, S));
            });
          }
          return I;
        }
        function C(I, D) {
          var w = typeof Symbol < "u" && I[Symbol.iterator] || I["@@iterator"];
          if (w)
            return (w = w.call(I)).next.bind(w);
          if (Array.isArray(I) || (w = function(O, F) {
            if (O) {
              if (typeof O == "string")
                return L(O, F);
              var j = Object.prototype.toString.call(O).slice(8, -1);
              if (j === "Object" && O.constructor && (j = O.constructor.name), j === "Map" || j === "Set")
                return Array.from(O);
              if (j === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))
                return L(O, F);
            }
          }(I)) || D && I && typeof I.length == "number") {
            w && (I = w);
            var S = 0;
            return function() {
              return S >= I.length ? { done: !0 } : { done: !1, value: I[S++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function L(I, D) {
          (D == null || D > I.length) && (D = I.length);
          for (var w = 0, S = new Array(D); w < D; w++)
            S[w] = I[w];
          return S;
        }
        var A = function(I) {
          function D() {
            for (var S, O = arguments.length, F = new Array(O), j = 0; j < O; j++)
              F[j] = arguments[j];
            return (S = I.call.apply(I, [this].concat(F)) || this).LOG_METHODS = ["log", "info", "warn", "debug", "error"], S.ADDED_LOG_PLUGIN_ID = [], S.maxLogNumber = 1e3, S.logCounter = 0, S.groupLevel = 0, S.groupLabelCollapsedStack = [], S.pluginPattern = void 0, S.logQueue = [], S.flushLogScheduled = !1, S.origConsole = {}, S;
          }
          (0, l.Z)(D, I);
          var w = D.prototype;
          return w.bindPlugin = function(S) {
            return !(this.ADDED_LOG_PLUGIN_ID.indexOf(S) > -1) && (this.ADDED_LOG_PLUGIN_ID.length === 0 && this.mockConsole(), y.O.create(S), this.ADDED_LOG_PLUGIN_ID.push(S), this.pluginPattern = new RegExp("^\\[(" + this.ADDED_LOG_PLUGIN_ID.join("|") + ")\\]$", "i"), !0);
          }, w.unbindPlugin = function(S) {
            var O = this.ADDED_LOG_PLUGIN_ID.indexOf(S);
            return O !== -1 && (this.ADDED_LOG_PLUGIN_ID.splice(O, 1), y.O.delete(S), this.ADDED_LOG_PLUGIN_ID.length === 0 && this.unmockConsole(), !0);
          }, w.mockConsole = function() {
            var S = this;
            typeof this.origConsole.log != "function" && (window.console ? (this.LOG_METHODS.map(function(O) {
              S.origConsole[O] = window.console[O];
            }), this.origConsole.time = window.console.time, this.origConsole.timeEnd = window.console.timeEnd, this.origConsole.clear = window.console.clear, this.origConsole.group = window.console.group, this.origConsole.groupCollapsed = window.console.groupCollapsed, this.origConsole.groupEnd = window.console.groupEnd) : window.console = {}, this._mockConsoleLog(), this._mockConsoleTime(), this._mockConsoleGroup(), this._mockConsoleClear(), window._vcOrigConsole = this.origConsole);
          }, w._mockConsoleLog = function() {
            var S = this;
            this.LOG_METHODS.map(function(O) {
              window.console[O] = (function() {
                for (var F = arguments.length, j = new Array(F), P = 0; P < F; P++)
                  j[P] = arguments[P];
                S.addLog({ type: O, origData: j || [] });
              }).bind(window.console);
            });
          }, w._mockConsoleTime = function() {
            var S = this, O = {};
            window.console.time = (function(F) {
              F === void 0 && (F = ""), O[F] = Date.now();
            }).bind(window.console), window.console.timeEnd = (function(F) {
              F === void 0 && (F = "");
              var j = O[F], P = 0;
              j && (P = Date.now() - j, delete O[F]), S.addLog({ type: "log", origData: [F + ": " + P + "ms"] });
            }).bind(window.console);
          }, w._mockConsoleGroup = function() {
            var S = this, O = function(F) {
              return (function(j) {
                j === void 0 && (j = "console.group");
                var P = Symbol(j);
                S.groupLabelCollapsedStack.push({ label: P, collapsed: F }), S.addLog({ type: "log", origData: [j], isGroupHeader: F ? 2 : 1, isGroupCollapsed: !1 }, { noOrig: !0 }), S.groupLevel++, F ? S.origConsole.groupCollapsed(j) : S.origConsole.group(j);
              }).bind(window.console);
            };
            window.console.group = O(!1), window.console.groupCollapsed = O(!0), window.console.groupEnd = (function() {
              S.groupLabelCollapsedStack.pop(), S.groupLevel = Math.max(0, S.groupLevel - 1), S.origConsole.groupEnd();
            }).bind(window.console);
          }, w._mockConsoleClear = function() {
            var S = this;
            window.console.clear = (function() {
              S.resetGroup(), S.clearLog();
              for (var O = arguments.length, F = new Array(O), j = 0; j < O; j++)
                F[j] = arguments[j];
              S.callOriginalConsole.apply(S, ["clear"].concat(F));
            }).bind(window.console);
          }, w.unmockConsole = function() {
            for (var S in this.origConsole)
              window.console[S] = this.origConsole[S], delete this.origConsole[S];
            window._vcOrigConsole && delete window._vcOrigConsole;
          }, w.callOriginalConsole = function(S) {
            if (typeof this.origConsole[S] == "function") {
              for (var O = arguments.length, F = new Array(O > 1 ? O - 1 : 0), j = 1; j < O; j++)
                F[j - 1] = arguments[j];
              this.origConsole[S].apply(window.console, F);
            }
          }, w.resetGroup = function() {
            for (; this.groupLevel > 0; )
              console.groupEnd();
          }, w.clearLog = function() {
            var S = y.O.getAll();
            for (var O in S)
              this.clearPluginLog(O);
          }, w.clearPluginLog = function(S) {
            var O = this.logQueue;
            this.logQueue = [];
            for (var F, j = C(O); !(F = j()).done; ) {
              var P = F.value;
              this._extractPluginIdByLog(P) !== S && this.logQueue.push(P);
            }
            y.O.get(S).update(function($) {
              return $.logList.length = 0, $;
            }), g.x.updateTime();
          }, w.addLog = function(S, O) {
            S === void 0 && (S = { type: "log", origData: [], isGroupHeader: 0, isGroupCollapsed: !1 });
            var F = this.groupLabelCollapsedStack[this.groupLabelCollapsedStack.length - 2], j = this.groupLabelCollapsedStack[this.groupLabelCollapsedStack.length - 1], P = { _id: a.QI(), type: S.type, cmdType: O == null ? void 0 : O.cmdType, toggle: {}, date: Date.now(), data: (0, _.b1)(S.origData || []), repeated: 0, groupLabel: j == null ? void 0 : j.label, groupLevel: this.groupLevel, groupHeader: S.isGroupHeader, groupCollapsed: S.isGroupHeader ? !(F == null || !F.collapsed) : !(j == null || !j.collapsed) };
            this._signalLog(P), O != null && O.noOrig || this.callOriginalConsole.apply(this, [S.type].concat(S.origData));
          }, w.evalCommand = function(S) {
            this.addLog({ type: "log", origData: [S] }, { cmdType: "input" });
            var O = void 0;
            try {
              O = eval.call(window, "(" + S + ")");
            } catch {
              try {
                O = eval.call(window, S);
              } catch {
              }
            }
            this.addLog({ type: "log", origData: [O] }, { cmdType: "output" });
          }, w._signalLog = function(S) {
            var O = this;
            this.flushLogScheduled || (this.flushLogScheduled = !0, window.requestAnimationFrame(function() {
              O.flushLogScheduled = !1, O._flushLogs();
            })), this.logQueue.push(S);
          }, w._flushLogs = function() {
            var S = this, O = this.logQueue;
            this.logQueue = [];
            for (var F, j = {}, P = C(O); !(F = P()).done; ) {
              var $ = F.value, V = this._extractPluginIdByLog($);
              (j[V] = j[V] || []).push($);
            }
            for (var q = function(ye) {
              var ce = j[ye];
              y.O.get(ye).update(function(Q) {
                for (var se, fe = [].concat(Q.logList), G = C(ce); !(se = G()).done; ) {
                  var K = se.value;
                  S._isRepeatedLog(fe, K) ? S._updateLastLogRepeated(fe) : fe.push(K);
                }
                return { logList: fe = S._limitLogListLength(fe) };
              });
            }, ee = 0, re = Object.keys(j); ee < re.length; ee++)
              q(re[ee]);
            g.x.updateTime();
          }, w._extractPluginIdByLog = function(S) {
            var O, F = "default", j = (O = S.data[0]) == null ? void 0 : O.origData;
            if (a.HD(j)) {
              var P = j.match(this.pluginPattern);
              if (P !== null && P.length > 1) {
                var $ = P[1].toLowerCase();
                this.ADDED_LOG_PLUGIN_ID.indexOf($) > -1 && (F = $, S.data.shift());
              }
            }
            return F;
          }, w._isRepeatedLog = function(S, O) {
            var F = S[S.length - 1];
            if (!F)
              return !1;
            var j = !1;
            if (O.type === F.type && O.cmdType === F.cmdType && O.data.length === F.data.length) {
              j = !0;
              for (var P = 0; P < O.data.length; P++)
                if (O.data[P].origData !== F.data[P].origData) {
                  j = !1;
                  break;
                }
            }
            return j;
          }, w._updateLastLogRepeated = function(S) {
            var O = S[S.length - 1], F = O.repeated ? O.repeated + 1 : 2;
            return S[S.length - 1] = E(E({}, O), {}, { repeated: F }), S;
          }, w._limitLogListLength = function(S) {
            var O = S.length, F = this.maxLogNumber;
            return O > F ? S.slice(O - F, O) : S;
          }, D;
        }(e.N);
      }, 9923: function(f, t, n) {
        n.d(t, { O: function() {
          return l;
        } });
        var r = n(3313), l = function() {
          function a() {
          }
          return a.create = function(e) {
            return this.storeMap[e] || (this.storeMap[e] = (0, r.fZ)({ logList: [] })), this.storeMap[e];
          }, a.delete = function(e) {
            this.storeMap[e] && delete this.storeMap[e];
          }, a.get = function(e) {
            return this.storeMap[e];
          }, a.getRaw = function(e) {
            return (0, r.U2)(this.storeMap[e]);
          }, a.getAll = function() {
            return this.storeMap;
          }, a;
        }();
        l.storeMap = {};
      }, 8665: function(f, t, n) {
        n.d(t, { HX: function() {
          return x;
        }, LH: function() {
          return a;
        }, Tg: function() {
          return L;
        }, b1: function() {
          return C;
        }, oj: function() {
          return y;
        } });
        var r = n(5103), l = function(A) {
          var I = r.hZ(A, { maxDepth: 0 }), D = I.substring(0, 36), w = r.DV(A);
          return I.length > 36 && (D += "..."), w = r.rE(w + " " + D);
        }, a = function(A, I) {
          I === void 0 && (I = !0);
          var D = "undefined", w = A;
          return A instanceof L ? (D = "uninvocatable", w = "(...)") : r.kJ(A) ? (D = "array", w = l(A)) : r.Kn(A) ? (D = "object", w = l(A)) : r.HD(A) ? (D = "string", w = r.rE(A), I && (w = '"' + w + '"')) : r.hj(A) ? (D = "number", w = String(A)) : r.C4(A) ? (D = "bigint", w = String(A) + "n") : r.jn(A) ? (D = "boolean", w = String(A)) : r.Ft(A) ? (D = "null", w = "null") : r.o8(A) ? (D = "undefined", w = "undefined") : r.mf(A) ? (D = "function", w = (A.name || "function") + "()") : r.yk(A) && (D = "symbol", w = String(A)), { text: w, valueType: D };
        }, e = [".", "[", "(", "{", "}"], g = ["]", ")", "}"], _ = function(A, I, D) {
          D === void 0 && (D = 0);
          for (var w = { text: "", pos: -1, before: "", after: "" }, S = A.length - 1; S >= D; S--) {
            var O = I.indexOf(A[S]);
            if (O > -1) {
              w.text = I[O], w.pos = S, w.before = A.substring(D, S), w.after = A.substring(S + 1, A.length);
              break;
            }
          }
          return w;
        }, y = function(A) {
          var I = _(A, e, 0);
          return { front: I, back: _(A, g, I.pos + 1) };
        }, x = function(A, I) {
          if (I === "")
            return !0;
          for (var D = 0; D < A.data.length; D++)
            if (typeof A.data[D].origData == "string" && A.data[D].origData.indexOf(I) > -1)
              return !0;
          return !1;
        }, E = /(\%[csdo] )|( \%[csdo])/g, C = function(A) {
          if (E.lastIndex = 0, r.HD(A[0]) && E.test(A[0])) {
            for (var I, D = [].concat(A), w = D.shift().split(E).filter(function(re) {
              return re !== void 0 && re !== "";
            }), S = D, O = [], F = !1, j = ""; w.length > 0; ) {
              var P = w.shift();
              if (/ ?\%c ?/.test(P) ? S.length > 0 ? typeof (j = S.shift()) != "string" && (j = "") : (I = P, j = "", F = !0) : / ?\%[sd] ?/.test(P) ? (I = S.length > 0 ? r.Kn(S[0]) ? r.DV(S.shift()) : String(S.shift()) : P, F = !0) : / ?\%o ?/.test(P) ? (I = S.length > 0 ? S.shift() : P, F = !0) : (I = P, F = !0), F) {
                var $ = { origData: I };
                j && ($.style = j), O.push($), F = !1, I = void 0, j = "";
              }
            }
            for (var V = 0; V < S.length; V++)
              O.push({ origData: S[V] });
            return O;
          }
          for (var q = [], ee = 0; ee < A.length; ee++)
            q.push({ origData: A[ee] });
          return q;
        }, L = function() {
        };
      }, 5313: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-icon {
  word-break: normal;
  white-space: normal;
  overflow: visible;
}
.vc-icon svg {
  fill: var(--VC-FG-2);
  height: 1em;
  width: 1em;
  vertical-align: -0.11em;
}
.vc-icon .vc-icon-delete {
  vertical-align: -0.11em;
}
.vc-icon .vc-icon-copy {
  height: 1.1em;
  width: 1.1em;
  vertical-align: -0.16em;
}
.vc-icon .vc-icon-suc {
  fill: var(--VC-TEXTGREEN);
  height: 1.1em;
  width: 1.1em;
  vertical-align: -0.16em;
}
`, ""]), t.Z = e;
      }, 1142: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-scroller-viewport {
  position: relative;
  overflow: hidden;
  height: 100%;
}
.vc-scroller-contents {
  min-height: 100%;
  will-change: transform;
}
.vc-scroller-items {
  will-change: height;
  position: relative;
}
.vc-scroller-item {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
}
.vc-scroller-viewport.static .vc-scroller-item {
  display: block;
  position: static;
}
.vc-scroller-scrollbar-track {
  width: 4px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 1px;
}
.vc-scroller-scrollbar-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
}
`, ""]), t.Z = e;
      }, 3283: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `#__vconsole {
  --VC-BG-0: #ededed;
  --VC-BG-1: #f7f7f7;
  --VC-BG-2: #fff;
  --VC-BG-3: #f7f7f7;
  --VC-BG-4: #4c4c4c;
  --VC-BG-5: #fff;
  --VC-BG-6: rgba(0, 0, 0, 0.1);
  --VC-FG-0: rgba(0, 0, 0, 0.9);
  --VC-FG-HALF: rgba(0, 0, 0, 0.9);
  --VC-FG-1: rgba(0, 0, 0, 0.5);
  --VC-FG-2: rgba(0, 0, 0, 0.3);
  --VC-FG-3: rgba(0, 0, 0, 0.1);
  --VC-RED: #fa5151;
  --VC-ORANGE: #fa9d3b;
  --VC-YELLOW: #ffc300;
  --VC-GREEN: #91d300;
  --VC-LIGHTGREEN: #95ec69;
  --VC-BRAND: #07c160;
  --VC-BLUE: #10aeff;
  --VC-INDIGO: #1485ee;
  --VC-PURPLE: #6467f0;
  --VC-LINK: #576b95;
  --VC-TEXTGREEN: #06ae56;
  --VC-FG: black;
  --VC-BG: white;
  --VC-BG-COLOR-ACTIVE: #ececec;
  --VC-WARN-BG: #fff3cc;
  --VC-WARN-BORDER: #ffe799;
  --VC-ERROR-BG: #fedcdc;
  --VC-ERROR-BORDER: #fdb9b9;
  --VC-DOM-TAG-NAME-COLOR: #881280;
  --VC-DOM-ATTRIBUTE-NAME-COLOR: #994500;
  --VC-DOM-ATTRIBUTE-VALUE-COLOR: #1a1aa6;
  --VC-CODE-KEY-FG: #881391;
  --VC-CODE-PRIVATE-KEY-FG: #cfa1d3;
  --VC-CODE-FUNC-FG: #0d22aa;
  --VC-CODE-NUMBER-FG: #1c00cf;
  --VC-CODE-STR-FG: #c41a16;
  --VC-CODE-NULL-FG: #808080;
  color: var(--VC-FG-0);
  font-size: 13px;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  -webkit-user-select: auto;
  /* global */
}
#__vconsole .vc-max-height {
  max-height: 19.23076923em;
}
#__vconsole .vc-max-height-line {
  max-height: 6.30769231em;
}
#__vconsole .vc-min-height {
  min-height: 3.07692308em;
}
#__vconsole dd,
#__vconsole dl,
#__vconsole pre {
  margin: 0;
}
#__vconsole pre {
  white-space: pre-wrap;
}
#__vconsole i {
  font-style: normal;
}
.vc-table {
  height: 100%;
}
.vc-table .vc-table-row {
  line-height: 1.5;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -moz-box-orient: horizontal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  overflow: hidden;
  border-bottom: 1px solid var(--VC-FG-3);
}
.vc-table .vc-table-row.vc-left-border {
  border-left: 1px solid var(--VC-FG-3);
}
.vc-table .vc-table-row-icon {
  margin-left: 4px;
}
.vc-table .vc-table-col {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -moz-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding: 0.23076923em 0.30769231em;
  border-left: 1px solid var(--VC-FG-3);
  overflow: auto;
}
.vc-table .vc-table-col:first-child {
  border: none;
}
.vc-table .vc-table-col-value {
  white-space: pre-wrap;
  word-break: break-word;
  /*white-space: nowrap;
    text-overflow: ellipsis;*/
  -webkit-overflow-scrolling: touch;
}
.vc-table .vc-small .vc-table-col {
  padding: 0 0.30769231em;
  font-size: 0.92307692em;
}
.vc-table .vc-table-col-2 {
  -webkit-box-flex: 2;
  -webkit-flex: 2;
  -moz-box-flex: 2;
  -ms-flex: 2;
  flex: 2;
}
.vc-table .vc-table-col-3 {
  -webkit-box-flex: 3;
  -webkit-flex: 3;
  -moz-box-flex: 3;
  -ms-flex: 3;
  flex: 3;
}
.vc-table .vc-table-col-4 {
  -webkit-box-flex: 4;
  -webkit-flex: 4;
  -moz-box-flex: 4;
  -ms-flex: 4;
  flex: 4;
}
.vc-table .vc-table-col-5 {
  -webkit-box-flex: 5;
  -webkit-flex: 5;
  -moz-box-flex: 5;
  -ms-flex: 5;
  flex: 5;
}
.vc-table .vc-table-col-6 {
  -webkit-box-flex: 6;
  -webkit-flex: 6;
  -moz-box-flex: 6;
  -ms-flex: 6;
  flex: 6;
}
.vc-table .vc-table-row-error {
  border-color: var(--VC-ERROR-BORDER);
  background-color: var(--VC-ERROR-BG);
}
.vc-table .vc-table-row-error .vc-table-col {
  color: var(--VC-RED);
  border-color: var(--VC-ERROR-BORDER);
}
.vc-table .vc-table-col-title {
  font-weight: bold;
}
.vc-table .vc-table-action {
  display: flex;
  justify-content: space-evenly;
}
.vc-table .vc-table-action .vc-icon {
  flex: 1;
  text-align: center;
  display: block;
}
.vc-table .vc-table-action .vc-icon:hover {
  background: var(--VC-BG-3);
}
.vc-table .vc-table-action .vc-icon:active {
  background: var(--VC-BG-1);
}
.vc-table .vc-table-input {
  width: 100%;
  border: none;
  color: var(--VC-FG-0);
  background-color: var(--VC-BG-6);
  height: 3.53846154em;
}
.vc-table .vc-table-input:focus {
  background-color: var(--VC-FG-2);
}
@media (prefers-color-scheme: dark) {
  #__vconsole:not([data-theme="light"]) {
    --VC-BG-0: #191919;
    --VC-BG-1: #1f1f1f;
    --VC-BG-2: #232323;
    --VC-BG-3: #2f2f2f;
    --VC-BG-4: #606060;
    --VC-BG-5: #2c2c2c;
    --VC-BG-6: rgba(255, 255, 255, 0.2);
    --VC-FG-0: rgba(255, 255, 255, 0.8);
    --VC-FG-HALF: rgba(255, 255, 255, 0.6);
    --VC-FG-1: rgba(255, 255, 255, 0.5);
    --VC-FG-2: rgba(255, 255, 255, 0.3);
    --VC-FG-3: rgba(255, 255, 255, 0.05);
    --VC-RED: #fa5151;
    --VC-ORANGE: #c87d2f;
    --VC-YELLOW: #cc9c00;
    --VC-GREEN: #74a800;
    --VC-LIGHTGREEN: #28b561;
    --VC-BRAND: #07c160;
    --VC-BLUE: #10aeff;
    --VC-INDIGO: #1196ff;
    --VC-PURPLE: #8183ff;
    --VC-LINK: #7d90a9;
    --VC-TEXTGREEN: #259c5c;
    --VC-FG: white;
    --VC-BG: black;
    --VC-BG-COLOR-ACTIVE: #282828;
    --VC-WARN-BG: #332700;
    --VC-WARN-BORDER: #664e00;
    --VC-ERROR-BG: #321010;
    --VC-ERROR-BORDER: #642020;
    --VC-DOM-TAG-NAME-COLOR: #5DB0D7;
    --VC-DOM-ATTRIBUTE-NAME-COLOR: #9BBBDC;
    --VC-DOM-ATTRIBUTE-VALUE-COLOR: #f29766;
    --VC-CODE-KEY-FG: #e36eec;
    --VC-CODE-PRIVATE-KEY-FG: #f4c5f7;
    --VC-CODE-FUNC-FG: #556af2;
    --VC-CODE-NUMBER-FG: #9980ff;
    --VC-CODE-STR-FG: #e93f3b;
    --VC-CODE-NULL-FG: #808080;
  }
}
#__vconsole[data-theme="dark"] {
  --VC-BG-0: #191919;
  --VC-BG-1: #1f1f1f;
  --VC-BG-2: #232323;
  --VC-BG-3: #2f2f2f;
  --VC-BG-4: #606060;
  --VC-BG-5: #2c2c2c;
  --VC-BG-6: rgba(255, 255, 255, 0.2);
  --VC-FG-0: rgba(255, 255, 255, 0.8);
  --VC-FG-HALF: rgba(255, 255, 255, 0.6);
  --VC-FG-1: rgba(255, 255, 255, 0.5);
  --VC-FG-2: rgba(255, 255, 255, 0.3);
  --VC-FG-3: rgba(255, 255, 255, 0.05);
  --VC-RED: #fa5151;
  --VC-ORANGE: #c87d2f;
  --VC-YELLOW: #cc9c00;
  --VC-GREEN: #74a800;
  --VC-LIGHTGREEN: #28b561;
  --VC-BRAND: #07c160;
  --VC-BLUE: #10aeff;
  --VC-INDIGO: #1196ff;
  --VC-PURPLE: #8183ff;
  --VC-LINK: #7d90a9;
  --VC-TEXTGREEN: #259c5c;
  --VC-FG: white;
  --VC-BG: black;
  --VC-BG-COLOR-ACTIVE: #282828;
  --VC-WARN-BG: #332700;
  --VC-WARN-BORDER: #664e00;
  --VC-ERROR-BG: #321010;
  --VC-ERROR-BORDER: #642020;
  --VC-DOM-TAG-NAME-COLOR: #5DB0D7;
  --VC-DOM-ATTRIBUTE-NAME-COLOR: #9BBBDC;
  --VC-DOM-ATTRIBUTE-VALUE-COLOR: #f29766;
  --VC-CODE-KEY-FG: #e36eec;
  --VC-CODE-PRIVATE-KEY-FG: #f4c5f7;
  --VC-CODE-FUNC-FG: #556af2;
  --VC-CODE-NUMBER-FG: #9980ff;
  --VC-CODE-STR-FG: #e93f3b;
  --VC-CODE-NULL-FG: #808080;
}
.vc-tabbar {
  border-bottom: 1px solid var(--VC-FG-3);
  overflow-x: auto;
  height: 3em;
  width: auto;
  white-space: nowrap;
}
.vc-tabbar .vc-tab {
  display: inline-block;
  line-height: 3em;
  padding: 0 1.15384615em;
  border-right: 1px solid var(--VC-FG-3);
  text-decoration: none;
  color: var(--VC-FG-0);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.vc-tabbar .vc-tab:active {
  background-color: rgba(0, 0, 0, 0.15);
}
.vc-tabbar .vc-tab.vc-actived {
  background-color: var(--VC-BG-1);
}
.vc-toolbar {
  border-top: 1px solid var(--VC-FG-3);
  line-height: 3em;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -moz-box-orient: horizontal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
}
.vc-toolbar .vc-tool {
  display: none;
  font-style: normal;
  text-decoration: none;
  color: var(--VC-FG-0);
  width: 50%;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -moz-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  text-align: center;
  position: relative;
  -webkit-touch-callout: none;
}
.vc-toolbar .vc-tool.vc-toggle,
.vc-toolbar .vc-tool.vc-global-tool {
  display: block;
}
.vc-toolbar .vc-tool:active {
  background-color: rgba(0, 0, 0, 0.15);
}
.vc-toolbar .vc-tool:after {
  content: " ";
  position: absolute;
  top: 0.53846154em;
  bottom: 0.53846154em;
  right: 0;
  border-left: 1px solid var(--VC-FG-3);
}
.vc-toolbar .vc-tool-last:after {
  border: none;
}
.vc-topbar {
  background-color: var(--VC-BG-1);
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  -moz-box-orient: horizontal;
  -moz-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  width: 100%;
}
.vc-topbar .vc-toptab {
  display: none;
  -webkit-box-flex: 1;
  -webkit-flex: 1;
  -moz-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  line-height: 2.30769231em;
  padding: 0 1.15384615em;
  border-bottom: 1px solid var(--VC-FG-3);
  text-decoration: none;
  text-align: center;
  color: var(--VC-FG-0);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.vc-topbar .vc-toptab.vc-toggle {
  display: block;
}
.vc-topbar .vc-toptab:active {
  background-color: rgba(0, 0, 0, 0.15);
}
.vc-topbar .vc-toptab.vc-actived {
  border-bottom: 1px solid var(--VC-INDIGO);
}
.vc-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 10001;
  -webkit-transition: background 0.3s;
  transition: background 0.3s;
  -webkit-tap-highlight-color: transparent;
  overflow-y: scroll;
}
.vc-panel {
  display: none;
  position: fixed;
  min-height: 85%;
  left: 0;
  right: 0;
  bottom: -100%;
  z-index: 10002;
  background-color: var(--VC-BG-0);
  transition: bottom 0.3s;
}
.vc-toggle .vc-switch {
  display: none;
}
.vc-toggle .vc-mask {
  background: rgba(0, 0, 0, 0.6);
  display: block;
}
.vc-toggle .vc-panel {
  bottom: 0;
}
.vc-content {
  background-color: var(--VC-BG-2);
  overflow-x: hidden;
  overflow-y: auto;
  position: absolute;
  top: 3.07692308em;
  left: 0;
  right: 0;
  bottom: 3.07692308em;
  -webkit-overflow-scrolling: touch;
  margin-bottom: constant(safe-area-inset-bottom);
  margin-bottom: env(safe-area-inset-bottom);
}
.vc-content.vc-has-topbar {
  top: 5.46153846em;
}
.vc-plugin-box {
  display: none;
  position: relative;
  min-height: 100%;
}
.vc-plugin-box.vc-fixed-height {
  height: 100%;
}
.vc-plugin-box.vc-actived {
  display: block;
}
.vc-plugin-content {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.vc-plugin-content:empty:before {
  content: "Empty";
  color: var(--VC-FG-1);
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 1.15384615em;
  text-align: center;
}
.vc-plugin-empty {
  color: var(--VC-FG-1);
  font-size: 1.15384615em;
  height: 100%;
  width: 100%;
  padding: 1.15384615em 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
  .vc-toolbar,
  .vc-switch {
    bottom: constant(safe-area-inset-bottom);
    bottom: env(safe-area-inset-bottom);
  }
}
`, ""]), t.Z = e;
      }, 7558: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-switch {
  display: block;
  position: fixed;
  right: 0.76923077em;
  bottom: 0.76923077em;
  color: #FFF;
  background-color: var(--VC-BRAND);
  line-height: 1;
  font-size: 1.07692308em;
  padding: 0.61538462em 1.23076923em;
  z-index: 10000;
  border-radius: 0.30769231em;
  box-shadow: 0 0 0.61538462em rgba(0, 0, 0, 0.4);
}
`, ""]), t.Z = e;
      }, 5670: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `/* color */
.vcelm-node {
  color: var(--VC-DOM-TAG-NAME-COLOR);
}
.vcelm-k {
  color: var(--VC-DOM-ATTRIBUTE-NAME-COLOR);
}
.vcelm-v {
  color: var(--VC-DOM-ATTRIBUTE-VALUE-COLOR);
}
.vcelm-l.vc-actived > .vcelm-node {
  background-color: var(--VC-FG-3);
}
/* layout */
.vcelm-l {
  padding-left: 8px;
  position: relative;
  word-wrap: break-word;
  line-height: 1.2;
}
/*.vcelm-l.vcelm-noc {
  padding-left: 0;
}*/
.vcelm-l .vcelm-node:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vcelm-l.vcelm-noc .vcelm-node:active {
  background-color: transparent;
}
.vcelm-t {
  white-space: pre-wrap;
  word-wrap: break-word;
}
/* level */
/* arrow */
.vcelm-l:before {
  content: "";
  display: block;
  position: absolute;
  top: 6px;
  left: 3px;
  width: 0;
  height: 0;
  border: transparent solid 3px;
  border-left-color: var(--VC-FG-1);
}
.vcelm-l.vc-toggle:before {
  display: block;
  top: 6px;
  left: 0;
  border-top-color: var(--VC-FG-1);
  border-left-color: transparent;
}
.vcelm-l.vcelm-noc:before {
  display: none;
}
`, ""]), t.Z = e;
      }, 3327: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, "", ""]), t.Z = e;
      }, 1130: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-cmd {
  height: 3.07692308em;
  border-top: 1px solid var(--VC-FG-3);
  display: flex;
  flex-direction: row;
}
.vc-cmd.vc-filter {
  bottom: 0;
}
.vc-cmd-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  height: 2.15384615em;
  padding: 0.46153846em 0.61538462em;
}
.vc-cmd-input {
  width: 100%;
  border: none;
  resize: none;
  outline: none;
  padding: 0;
  font-size: 0.92307692em;
  background-color: transparent;
  color: var(--VC-FG-0);
}
.vc-cmd-input::-webkit-input-placeholder {
  line-height: 2.15384615em;
}
.vc-cmd-btn {
  width: 3.07692308em;
  border: none;
  background-color: var(--VC-BG-0);
  color: var(--VC-FG-0);
  outline: none;
  -webkit-touch-callout: none;
  font-size: 1em;
}
.vc-cmd-clear-btn {
  flex: 1 3.07692308em;
  text-align: center;
  line-height: 3.07692308em;
}
.vc-cmd-btn:active,
.vc-cmd-clear-btn:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vc-cmd-prompted {
  position: absolute;
  left: 0.46153846em;
  right: 0.46153846em;
  background-color: var(--VC-BG-3);
  border: 1px solid var(--VC-FG-3);
  overflow-x: scroll;
  display: none;
}
.vc-cmd-prompted li {
  list-style: none;
  line-height: 30px;
  padding: 0 0.46153846em;
  border-bottom: 1px solid var(--VC-FG-3);
}
.vc-cmd-prompted li:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vc-cmd-prompted-hide {
  text-align: center;
}
`, ""]), t.Z = e;
      }, 7147: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-log-row {
  margin: 0;
  padding: 0.46153846em 0.61538462em;
  overflow: hidden;
  line-height: 1.3;
  border-bottom: 1px solid var(--VC-FG-3);
  word-break: break-word;
  position: relative;
  display: flex;
}
.vc-log-info {
  color: var(--VC-PURPLE);
}
.vc-log-debug {
  color: var(--VC-YELLOW);
}
.vc-log-warn {
  color: var(--VC-ORANGE);
  border-color: var(--VC-WARN-BORDER);
  background-color: var(--VC-WARN-BG);
}
.vc-log-error {
  color: var(--VC-RED);
  border-color: var(--VC-ERROR-BORDER);
  background-color: var(--VC-ERROR-BG);
}
.vc-logrow-icon {
  margin-left: auto;
}
.vc-log-padding {
  width: 1.53846154em;
  border-left: 1px solid var(--VC-FG-3);
}
.vc-log-group .vc-log-content {
  font-weight: bold;
}
.vc-log-group-toggle {
  padding-left: 0.76923077em;
}
.vc-log-group-toggle {
  display: block;
  font-style: italic;
  padding-left: 0.76923077em;
  position: relative;
}
.vc-log-group-toggle:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vc-log-group > .vc-log-group-toggle::before {
  content: "";
  position: absolute;
  top: 0.30769231em;
  left: 0.15384615em;
  width: 0;
  height: 0;
  border: transparent solid 0.30769231em;
  border-left-color: var(--VC-FG-1);
}
.vc-log-group.vc-toggle > .vc-log-group-toggle::before {
  top: 0.46153846em;
  left: 0;
  border-top-color: var(--VC-FG-1);
  border-left-color: transparent;
}
.vc-log-time {
  width: 6.15384615em;
  color: #777;
}
.vc-log-repeat i {
  margin-right: 0.30769231em;
  padding: 0 6.5px;
  color: #D7E0EF;
  background-color: #42597F;
  border-radius: 8.66666667px;
}
.vc-log-error .vc-log-repeat i {
  color: #901818;
  background-color: var(--VC-RED);
}
.vc-log-warn .vc-log-repeat i {
  color: #987D20;
  background-color: #F4BD02;
}
.vc-log-content {
  flex: 1;
}
.vc-log-input,
.vc-log-output {
  padding-left: 0.92307692em;
}
.vc-log-input:before,
.vc-log-output:before {
  content: "›";
  position: absolute;
  top: 0.15384615em;
  left: 0;
  font-size: 1.23076923em;
  color: #6A5ACD;
}
.vc-log-output:before {
  content: "‹";
}
`, ""]), t.Z = e;
      }, 1237: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-log-tree {
  display: block;
  overflow: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.vc-log-tree-node {
  display: block;
  font-style: italic;
  padding-left: 0.76923077em;
  position: relative;
}
.vc-log-tree.vc-is-tree > .vc-log-tree-node:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vc-log-tree.vc-is-tree > .vc-log-tree-node::before {
  content: "";
  position: absolute;
  top: 0.30769231em;
  left: 0.15384615em;
  width: 0;
  height: 0;
  border: transparent solid 0.30769231em;
  border-left-color: var(--VC-FG-1);
}
.vc-log-tree.vc-is-tree.vc-toggle > .vc-log-tree-node::before {
  top: 0.46153846em;
  left: 0;
  border-top-color: var(--VC-FG-1);
  border-left-color: transparent;
}
.vc-log-tree-child {
  margin-left: 0.76923077em;
}
.vc-log-tree-loadmore {
  text-decoration: underline;
  padding-left: 1.84615385em;
  position: relative;
  color: var(--VC-CODE-FUNC-FG);
}
.vc-log-tree-loadmore::before {
  content: "››";
  position: absolute;
  top: -0.15384615em;
  left: 0.76923077em;
  font-size: 1.23076923em;
  color: var(--VC-CODE-FUNC-FG);
}
.vc-log-tree-loadmore:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
`, ""]), t.Z = e;
      }, 845: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-log-key {
  color: var(--VC-CODE-KEY-FG);
}
.vc-log-key-private {
  color: var(--VC-CODE-PRIVATE-KEY-FG);
}
.vc-log-val {
  white-space: pre-line;
}
.vc-log-val-function {
  color: var(--VC-CODE-FUNC-FG);
  font-style: italic !important;
}
.vc-log-val-bigint {
  color: var(--VC-CODE-FUNC-FG);
}
.vc-log-val-number,
.vc-log-val-boolean {
  color: var(--VC-CODE-NUMBER-FG);
}
.vc-log-val-string {
  white-space: pre-wrap;
}
.vc-log-val-string.vc-log-val-haskey {
  color: var(--VC-CODE-STR-FG);
  white-space: normal;
}
.vc-log-val-null,
.vc-log-val-undefined,
.vc-log-val-uninvocatable {
  color: var(--VC-CODE-NULL-FG);
}
.vc-log-val-symbol {
  color: var(--VC-CODE-STR-FG);
}
`, ""]), t.Z = e;
      }, 8747: function(f, t, n) {
        var r = n(6738), l = n.n(r), a = n(7705), e = n.n(a)()(l());
        e.push([f.id, `.vc-group .vc-group-preview {
  -webkit-touch-callout: none;
}
.vc-group .vc-group-preview:active {
  background-color: var(--VC-BG-COLOR-ACTIVE);
}
.vc-group .vc-group-detail {
  display: none;
  padding: 0 0 0.76923077em 1.53846154em;
  border-bottom: 1px solid var(--VC-FG-3);
}
.vc-group.vc-actived .vc-group-detail {
  display: block;
  background-color: var(--VC-BG-1);
}
.vc-group.vc-actived .vc-table-row {
  background-color: var(--VC-BG-2);
}
.vc-group.vc-actived .vc-group-preview {
  background-color: var(--VC-BG-1);
}
`, ""]), t.Z = e;
      }, 3411: function(f, t, n) {
        var r = n(3379), l = n.n(r), a = n(7795), e = n.n(a), g = n(569), _ = n.n(g), y = n(3565), x = n.n(y), E = n(9216), C = n.n(E), L = n(4589), A = n.n(L), I = n(1130), D = {};
        I.Z && I.Z.locals && (D.locals = I.Z.locals);
        var w, S = 0, O = {};
        O.styleTagTransform = A(), O.setAttributes = x(), O.insert = _().bind(null, "head"), O.domAPI = e(), O.insertStyleElement = C(), D.use = function(F) {
          return O.options = F || {}, S++ || (w = l()(I.Z, O)), D;
        }, D.unuse = function() {
          S > 0 && !--S && (w(), w = null);
        }, t.Z = D;
      }, 3379: function(f) {
        var t = [];
        function n(a) {
          for (var e = -1, g = 0; g < t.length; g++)
            if (t[g].identifier === a) {
              e = g;
              break;
            }
          return e;
        }
        function r(a, e) {
          for (var g = {}, _ = [], y = 0; y < a.length; y++) {
            var x = a[y], E = e.base ? x[0] + e.base : x[0], C = g[E] || 0, L = "".concat(E, " ").concat(C);
            g[E] = C + 1;
            var A = n(L), I = { css: x[1], media: x[2], sourceMap: x[3], supports: x[4], layer: x[5] };
            if (A !== -1)
              t[A].references++, t[A].updater(I);
            else {
              var D = l(I, e);
              e.byIndex = y, t.splice(y, 0, { identifier: L, updater: D, references: 1 });
            }
            _.push(L);
          }
          return _;
        }
        function l(a, e) {
          var g = e.domAPI(e);
          return g.update(a), function(_) {
            if (_) {
              if (_.css === a.css && _.media === a.media && _.sourceMap === a.sourceMap && _.supports === a.supports && _.layer === a.layer)
                return;
              g.update(a = _);
            } else
              g.remove();
          };
        }
        f.exports = function(a, e) {
          var g = r(a = a || [], e = e || {});
          return function(_) {
            _ = _ || [];
            for (var y = 0; y < g.length; y++) {
              var x = n(g[y]);
              t[x].references--;
            }
            for (var E = r(_, e), C = 0; C < g.length; C++) {
              var L = n(g[C]);
              t[L].references === 0 && (t[L].updater(), t.splice(L, 1));
            }
            g = E;
          };
        };
      }, 569: function(f) {
        var t = {};
        f.exports = function(n, r) {
          var l = function(a) {
            if (t[a] === void 0) {
              var e = document.querySelector(a);
              if (window.HTMLIFrameElement && e instanceof window.HTMLIFrameElement)
                try {
                  e = e.contentDocument.head;
                } catch {
                  e = null;
                }
              t[a] = e;
            }
            return t[a];
          }(n);
          if (!l)
            throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
          l.appendChild(r);
        };
      }, 9216: function(f) {
        f.exports = function(t) {
          var n = document.createElement("style");
          return t.setAttributes(n, t.attributes), t.insert(n, t.options), n;
        };
      }, 3565: function(f, t, n) {
        f.exports = function(r) {
          var l = n.nc;
          l && r.setAttribute("nonce", l);
        };
      }, 7795: function(f) {
        f.exports = function(t) {
          var n = t.insertStyleElement(t);
          return { update: function(r) {
            (function(l, a, e) {
              var g = "";
              e.supports && (g += "@supports (".concat(e.supports, ") {")), e.media && (g += "@media ".concat(e.media, " {"));
              var _ = e.layer !== void 0;
              _ && (g += "@layer".concat(e.layer.length > 0 ? " ".concat(e.layer) : "", " {")), g += e.css, _ && (g += "}"), e.media && (g += "}"), e.supports && (g += "}");
              var y = e.sourceMap;
              y && typeof btoa < "u" && (g += `
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(y)))), " */")), a.styleTagTransform(g, l, a.options);
            })(n, t, r);
          }, remove: function() {
            (function(r) {
              if (r.parentNode === null)
                return !1;
              r.parentNode.removeChild(r);
            })(n);
          } };
        };
      }, 4589: function(f) {
        f.exports = function(t, n) {
          if (n.styleSheet)
            n.styleSheet.cssText = t;
          else {
            for (; n.firstChild; )
              n.removeChild(n.firstChild);
            n.appendChild(document.createTextNode(t));
          }
        };
      }, 6464: function(f, t, n) {
        function r(l) {
          if (l === void 0)
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
          return l;
        }
        n.d(t, { Z: function() {
          return r;
        } });
      }, 4296: function(f, t, n) {
        function r(a, e) {
          for (var g = 0; g < e.length; g++) {
            var _ = e[g];
            _.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(a, _.key, _);
          }
        }
        function l(a, e, g) {
          return e && r(a.prototype, e), g && r(a, g), Object.defineProperty(a, "prototype", { writable: !1 }), a;
        }
        n.d(t, { Z: function() {
          return l;
        } });
      }, 8270: function(f, t, n) {
        function r(l, a, e) {
          return a in l ? Object.defineProperty(l, a, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : l[a] = e, l;
        }
        n.d(t, { Z: function() {
          return r;
        } });
      }, 6881: function(f, t, n) {
        n.d(t, { Z: function() {
          return l;
        } });
        var r = n(2717);
        function l(a, e) {
          a.prototype = Object.create(e.prototype), a.prototype.constructor = a, (0, r.Z)(a, e);
        }
      }, 2717: function(f, t, n) {
        function r(l, a) {
          return r = Object.setPrototypeOf || function(e, g) {
            return e.__proto__ = g, e;
          }, r(l, a);
        }
        n.d(t, { Z: function() {
          return r;
        } });
      }, 7003: function(f, t, n) {
        n.d(t, { H3: function() {
          return r.H3E;
        }, ev: function() {
          return r.evW;
        }, x: function() {
          return r.xa3;
        } });
        var r = n(2942);
      }, 2942: function(f, t, n) {
        n.d(t, { f_C: function() {
          return Bt;
        }, hjT: function() {
          return ft;
        }, R3I: function() {
          return j;
        }, Ljt: function() {
          return G;
        }, akz: function() {
          return me;
        }, VnY: function() {
          return Ve;
        }, cKT: function() {
          return Ye;
        }, gbL: function() {
          return bt;
        }, FIv: function() {
          return L;
        }, XGm: function() {
          return O;
        }, xa3: function() {
          return Xe;
        }, YCL: function() {
          return Ee;
        }, nuO: function() {
          return A;
        }, vpE: function() {
          return De;
        }, RMB: function() {
          return V;
        }, ogt: function() {
          return $;
        }, bGB: function() {
          return q;
        }, cSb: function() {
          return ce;
        }, yl1: function() {
          return en;
        }, VOJ: function() {
          return S;
        }, u2N: function() {
          return D;
        }, $XI: function() {
          return C;
        }, lig: function() {
          return Gt;
        }, dvw: function() {
          return sn;
        }, S1n: function() {
          return pt;
        }, $Tr: function() {
          return P;
        }, sBU: function() {
          return g;
        }, oLt: function() {
          return Q;
        }, yef: function() {
          return Ae;
        }, ZTd: function() {
          return r;
        }, AqN: function() {
          return y;
        }, evW: function() {
          return Oe;
        }, H3E: function() {
          return we;
        }, cly: function() {
          return xt;
        }, AT7: function() {
          return se;
        }, j7q: function() {
          return e;
        }, N8: function() {
          return _;
        }, rTO: function() {
          return K;
        }, BmG: function() {
          return de;
        }, fxP: function() {
          return F;
        }, czc: function() {
          return ve;
        }, DhX: function() {
          return ye;
        }, XET: function() {
          return fe;
        }, LdU: function() {
          return E;
        }, bi5: function() {
          return ee;
        }, fLW: function() {
          return re;
        }, VHj: function() {
          return ae;
        }, Ui: function() {
          return Vt;
        }, etI: function() {
          return tn;
        }, GQg: function() {
          return Xt;
        }, kmG: function() {
          return w;
        } }), n(2717), n(6881);
        function r() {
        }
        function l(H) {
          return H();
        }
        function a() {
          return /* @__PURE__ */ Object.create(null);
        }
        function e(H) {
          H.forEach(l);
        }
        function g(H) {
          return typeof H == "function";
        }
        function _(H, te) {
          return H != H ? te == te : H !== te || H && typeof H == "object" || typeof H == "function";
        }
        function y(H, te) {
          return H != H ? te == te : H !== te;
        }
        function x(H) {
          return Object.keys(H).length === 0;
        }
        function E(H) {
          if (H == null)
            return r;
          for (var te = arguments.length, Y = new Array(te > 1 ? te - 1 : 0), ie = 1; ie < te; ie++)
            Y[ie - 1] = arguments[ie];
          var ge = H.subscribe.apply(H, Y);
          return ge.unsubscribe ? function() {
            return ge.unsubscribe();
          } : ge;
        }
        function C(H) {
          var te;
          return E(H, function(Y) {
            return te = Y;
          })(), te;
        }
        function L(H, te, Y) {
          H.$$.on_destroy.push(E(te, Y));
        }
        function A(H, te, Y, ie) {
          if (H) {
            var ge = I(H, te, Y, ie);
            return H[0](ge);
          }
        }
        function I(H, te, Y, ie) {
          return H[1] && ie ? function(ge, ke) {
            for (var Be in ke)
              ge[Be] = ke[Be];
            return ge;
          }(Y.ctx.slice(), H[1](ie(te))) : Y.ctx;
        }
        function D(H, te, Y, ie) {
          if (H[2] && ie) {
            var ge = H[2](ie(Y));
            if (te.dirty === void 0)
              return ge;
            if (typeof ge == "object") {
              for (var ke = [], Be = Math.max(te.dirty.length, ge.length), ut = 0; ut < Be; ut += 1)
                ke[ut] = te.dirty[ut] | ge[ut];
              return ke;
            }
            return te.dirty | ge;
          }
          return te.dirty;
        }
        function w(H, te, Y, ie, ge, ke) {
          if (ge) {
            var Be = I(te, Y, ie, ke);
            H.p(Be, ge);
          }
        }
        function S(H) {
          if (H.ctx.length > 32) {
            for (var te = [], Y = H.ctx.length / 32, ie = 0; ie < Y; ie++)
              te[ie] = -1;
            return te;
          }
          return -1;
        }
        function O(H) {
          var te = {};
          for (var Y in H)
            te[Y] = !0;
          return te;
        }
        function F(H, te, Y) {
          return H.set(Y), te;
        }
        function j(H, te) {
          H.appendChild(te);
        }
        function P(H, te, Y) {
          H.insertBefore(te, Y || null);
        }
        function $(H) {
          H.parentNode.removeChild(H);
        }
        function V(H, te) {
          for (var Y = 0; Y < H.length; Y += 1)
            H[Y] && H[Y].d(te);
        }
        function q(H) {
          return document.createElement(H);
        }
        function ee(H) {
          return document.createElementNS("http://www.w3.org/2000/svg", H);
        }
        function re(H) {
          return document.createTextNode(H);
        }
        function ye() {
          return re(" ");
        }
        function ce() {
          return re("");
        }
        function Q(H, te, Y, ie) {
          return H.addEventListener(te, Y, ie), function() {
            return H.removeEventListener(te, Y, ie);
          };
        }
        function se(H) {
          return function(te) {
            return te.preventDefault(), H.call(this, te);
          };
        }
        function fe(H) {
          return function(te) {
            return te.stopPropagation(), H.call(this, te);
          };
        }
        function G(H, te, Y) {
          Y == null ? H.removeAttribute(te) : H.getAttribute(te) !== Y && H.setAttribute(te, Y);
        }
        function K(H, te) {
          te = "" + te, H.wholeText !== te && (H.data = te);
        }
        function de(H, te) {
          H.value = te ?? "";
        }
        function ve(H, te, Y, ie) {
          Y === null ? H.style.removeProperty(te) : H.style.setProperty(te, Y, ie ? "important" : "");
        }
        function ae(H, te, Y) {
          H.classList[Y ? "add" : "remove"](te);
        }
        function J(H, te, Y) {
          Y === void 0 && (Y = !1);
          var ie = document.createEvent("CustomEvent");
          return ie.initCustomEvent(H, Y, !1, te), ie;
        }
        var U;
        function X(H) {
          U = H;
        }
        function ne() {
          if (!U)
            throw new Error("Function called outside component initialization");
          return U;
        }
        function we(H) {
          ne().$$.on_mount.push(H);
        }
        function Oe(H) {
          ne().$$.on_destroy.push(H);
        }
        function Xe() {
          var H = ne();
          return function(te, Y) {
            var ie = H.$$.callbacks[te];
            if (ie) {
              var ge = J(te, Y);
              ie.slice().forEach(function(ke) {
                ke.call(H, ge);
              });
            }
          };
        }
        function Ye(H, te) {
          var Y = this, ie = H.$$.callbacks[te.type];
          ie && ie.slice().forEach(function(ge) {
            return ge.call(Y, te);
          });
        }
        var Pe = [], Ve = [], Ze = [], ot = [], tt = Promise.resolve(), Ge = !1;
        function We() {
          Ge || (Ge = !0, tt.then(en));
        }
        function He(H) {
          Ze.push(H);
        }
        function ft(H) {
          ot.push(H);
        }
        var Tt = /* @__PURE__ */ new Set(), Lt = 0;
        function en() {
          var H = U;
          do {
            for (; Lt < Pe.length; ) {
              var te = Pe[Lt];
              Lt++, X(te), Pt(te.$$);
            }
            for (X(null), Pe.length = 0, Lt = 0; Ve.length; )
              Ve.pop()();
            for (var Y = 0; Y < Ze.length; Y += 1) {
              var ie = Ze[Y];
              Tt.has(ie) || (Tt.add(ie), ie());
            }
            Ze.length = 0;
          } while (Pe.length);
          for (; ot.length; )
            ot.pop()();
          Ge = !1, Tt.clear(), X(H);
        }
        function Pt(H) {
          if (H.fragment !== null) {
            H.update(), e(H.before_update);
            var te = H.dirty;
            H.dirty = [-1], H.fragment && H.fragment.p(H.ctx, te), H.after_update.forEach(He);
          }
        }
        var St, $t = /* @__PURE__ */ new Set();
        function sn() {
          St = { r: 0, c: [], p: St };
        }
        function bt() {
          St.r || e(St.c), St = St.p;
        }
        function Vt(H, te) {
          H && H.i && ($t.delete(H), H.i(te));
        }
        function tn(H, te, Y, ie) {
          if (H && H.o) {
            if ($t.has(H))
              return;
            $t.add(H), St.c.push(function() {
              $t.delete(H), ie && (Y && H.d(1), ie());
            }), H.o(te);
          }
        }
        var Gt = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : commonjsGlobal;
        function xt(H, te) {
          tn(H, 1, 1, function() {
            te.delete(H.key);
          });
        }
        function Xt(H, te, Y, ie, ge, ke, Be, ut, Ct, ht, an, bn) {
          for (var Ft = H.length, Mt = ke.length, Wt = Ft, ln = {}; Wt--; )
            ln[H[Wt].key] = Wt;
          var xn = [], Rn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
          for (Wt = Mt; Wt--; ) {
            var An = bn(ge, ke, Wt), cn = Y(An), kn = Be.get(cn);
            kn ? ie && kn.p(An, te) : (kn = ht(cn, An)).c(), Rn.set(cn, xn[Wt] = kn), cn in ln && Cn.set(cn, Math.abs(Wt - ln[cn]));
          }
          var Kn = /* @__PURE__ */ new Set(), hn = /* @__PURE__ */ new Set();
          function Fn(gn) {
            Vt(gn, 1), gn.m(ut, an), Be.set(gn.key, gn), an = gn.first, Mt--;
          }
          for (; Ft && Mt; ) {
            var nn = xn[Mt - 1], un = H[Ft - 1], mn = nn.key, pn = un.key;
            nn === un ? (an = nn.first, Ft--, Mt--) : Rn.has(pn) ? !Be.has(mn) || Kn.has(mn) ? Fn(nn) : hn.has(pn) ? Ft-- : Cn.get(mn) > Cn.get(pn) ? (hn.add(mn), Fn(nn)) : (Kn.add(pn), Ft--) : (Ct(un, Be), Ft--);
          }
          for (; Ft--; ) {
            var rn = H[Ft];
            Rn.has(rn.key) || Ct(rn, Be);
          }
          for (; Mt; )
            Fn(xn[Mt - 1]);
          return xn;
        }
        function me(H, te, Y) {
          var ie = H.$$.props[te];
          ie !== void 0 && (H.$$.bound[ie] = Y, Y(H.$$.ctx[ie]));
        }
        function Ee(H) {
          H && H.c();
        }
        function Ae(H, te, Y, ie) {
          var ge = H.$$, ke = ge.fragment, Be = ge.on_mount, ut = ge.on_destroy, Ct = ge.after_update;
          ke && ke.m(te, Y), ie || He(function() {
            var ht = Be.map(l).filter(g);
            ut ? ut.push.apply(ut, ht) : e(ht), H.$$.on_mount = [];
          }), Ct.forEach(He);
        }
        function De(H, te) {
          var Y = H.$$;
          Y.fragment !== null && (e(Y.on_destroy), Y.fragment && Y.fragment.d(te), Y.on_destroy = Y.fragment = null, Y.ctx = []);
        }
        function it(H, te) {
          H.$$.dirty[0] === -1 && (Pe.push(H), We(), H.$$.dirty.fill(0)), H.$$.dirty[te / 31 | 0] |= 1 << te % 31;
        }
        function pt(H, te, Y, ie, ge, ke, Be, ut) {
          ut === void 0 && (ut = [-1]);
          var Ct = U;
          X(H);
          var ht = H.$$ = { fragment: null, ctx: null, props: ke, update: r, not_equal: ge, bound: a(), on_mount: [], on_destroy: [], on_disconnect: [], before_update: [], after_update: [], context: new Map(te.context || (Ct ? Ct.$$.context : [])), callbacks: a(), dirty: ut, skip_bound: !1, root: te.target || Ct.$$.root };
          Be && Be(ht.root);
          var an, bn = !1;
          if (ht.ctx = Y ? Y(H, te.props || {}, function(Mt, Wt) {
            var ln = !(arguments.length <= 2) && arguments.length - 2 ? arguments.length <= 2 ? void 0 : arguments[2] : Wt;
            return ht.ctx && ge(ht.ctx[Mt], ht.ctx[Mt] = ln) && (!ht.skip_bound && ht.bound[Mt] && ht.bound[Mt](ln), bn && it(H, Mt)), Wt;
          }) : [], ht.update(), bn = !0, e(ht.before_update), ht.fragment = !!ie && ie(ht.ctx), te.target) {
            if (te.hydrate) {
              var Ft = (an = te.target, Array.from(an.childNodes));
              ht.fragment && ht.fragment.l(Ft), Ft.forEach($);
            } else
              ht.fragment && ht.fragment.c();
            te.intro && Vt(H.$$.fragment), Ae(H, te.target, te.anchor, te.customElement), en();
          }
          X(Ct);
        }
        var Bt = function() {
          function H() {
          }
          var te = H.prototype;
          return te.$destroy = function() {
            De(this, 1), this.$destroy = r;
          }, te.$on = function(Y, ie) {
            var ge = this.$$.callbacks[Y] || (this.$$.callbacks[Y] = []);
            return ge.push(ie), function() {
              var ke = ge.indexOf(ie);
              ke !== -1 && ge.splice(ke, 1);
            };
          }, te.$set = function(Y) {
            this.$$set && !x(Y) && (this.$$.skip_bound = !0, this.$$set(Y), this.$$.skip_bound = !1);
          }, H;
        }();
      }, 3313: function(f, t, n) {
        n.d(t, { U2: function() {
          return r.$XI;
        }, fZ: function() {
          return g;
        } });
        var r = n(2942);
        function l(_, y) {
          var x = typeof Symbol < "u" && _[Symbol.iterator] || _["@@iterator"];
          if (x)
            return (x = x.call(_)).next.bind(x);
          if (Array.isArray(_) || (x = function(C, L) {
            if (C) {
              if (typeof C == "string")
                return a(C, L);
              var A = Object.prototype.toString.call(C).slice(8, -1);
              if (A === "Object" && C.constructor && (A = C.constructor.name), A === "Map" || A === "Set")
                return Array.from(C);
              if (A === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))
                return a(C, L);
            }
          }(_)) || y && _ && typeof _.length == "number") {
            x && (_ = x);
            var E = 0;
            return function() {
              return E >= _.length ? { done: !0 } : { done: !1, value: _[E++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function a(_, y) {
          (y == null || y > _.length) && (y = _.length);
          for (var x = 0, E = new Array(y); x < y; x++)
            E[x] = _[x];
          return E;
        }
        var e = [];
        function g(_, y) {
          var x;
          y === void 0 && (y = r.ZTd);
          var E = /* @__PURE__ */ new Set();
          function C(L) {
            if ((0, r.N8)(_, L) && (_ = L, x)) {
              for (var A, I = !e.length, D = l(E); !(A = D()).done; ) {
                var w = A.value;
                w[1](), e.push(w, _);
              }
              if (I) {
                for (var S = 0; S < e.length; S += 2)
                  e[S][0](e[S + 1]);
                e.length = 0;
              }
            }
          }
          return { set: C, update: function(L) {
            C(L(_));
          }, subscribe: function(L, A) {
            A === void 0 && (A = r.ZTd);
            var I = [L, A];
            return E.add(I), E.size === 1 && (x = y(C) || r.ZTd), L(_), function() {
              E.delete(I), E.size === 0 && (x(), x = null);
            };
          } };
        }
      } }, __webpack_module_cache__ = {};
      function __webpack_require__(f) {
        var t = __webpack_module_cache__[f];
        if (t !== void 0)
          return t.exports;
        var n = __webpack_module_cache__[f] = { id: f, exports: {} };
        return __webpack_modules__[f](n, n.exports, __webpack_require__), n.exports;
      }
      __webpack_require__.n = function(f) {
        var t = f && f.__esModule ? function() {
          return f.default;
        } : function() {
          return f;
        };
        return __webpack_require__.d(t, { a: t }), t;
      }, __webpack_require__.d = function(f, t) {
        for (var n in t)
          __webpack_require__.o(t, n) && !__webpack_require__.o(f, n) && Object.defineProperty(f, n, { enumerable: !0, get: t[n] });
      }, __webpack_require__.g = function() {
        if (typeof globalThis == "object")
          return globalThis;
        try {
          return this || new Function("return this")();
        } catch {
          if (typeof window == "object")
            return window;
        }
      }(), __webpack_require__.o = function(f, t) {
        return Object.prototype.hasOwnProperty.call(f, t);
      };
      var __webpack_exports__ = {};
      return function() {
        __webpack_require__.d(__webpack_exports__, { default: function() {
          return Ps;
        } }), __webpack_require__(5441), __webpack_require__(8765);
        var f = __webpack_require__(4296), t = __webpack_require__(5103), n = { one: function(d, c) {
          c === void 0 && (c = document);
          try {
            return c.querySelector(d) || void 0;
          } catch {
            return;
          }
        }, all: function(d, c) {
          c === void 0 && (c = document);
          try {
            var o = c.querySelectorAll(d);
            return [].slice.call(o);
          } catch {
            return [];
          }
        }, addClass: function(d, c) {
          if (d)
            for (var o = (0, t.kJ)(d) ? d : [d], s = 0; s < o.length; s++) {
              var u = (o[s].className || "").split(" ");
              u.indexOf(c) > -1 || (u.push(c), o[s].className = u.join(" "));
            }
        }, removeClass: function(d, c) {
          if (d)
            for (var o = (0, t.kJ)(d) ? d : [d], s = 0; s < o.length; s++) {
              for (var u = o[s].className.split(" "), h = 0; h < u.length; h++)
                u[h] == c && (u[h] = "");
              o[s].className = u.join(" ").trim();
            }
        }, hasClass: function(d, c) {
          return !(!d || !d.classList) && d.classList.contains(c);
        }, bind: function(d, c, o, s) {
          s === void 0 && (s = !1), d && ((0, t.kJ)(d) ? d : [d]).forEach(function(u) {
            u.addEventListener(c, o, !!s);
          });
        }, delegate: function(d, c, o, s) {
          d && d.addEventListener(c, function(u) {
            var h = n.all(o, d);
            if (h)
              e:
                for (var p = 0; p < h.length; p++)
                  for (var v = u.target; v; ) {
                    if (v == h[p]) {
                      s.call(v, u, v);
                      break e;
                    }
                    if ((v = v.parentNode) == d)
                      break;
                  }
          }, !1);
        }, removeChildren: function(d) {
          for (; d.firstChild; )
            d.removeChild(d.lastChild);
          return d;
        } }, r = n, l = __webpack_require__(6464), a = __webpack_require__(6881), e = __webpack_require__(2942), g = __webpack_require__(7003), _ = __webpack_require__(3379), y = __webpack_require__.n(_), x = __webpack_require__(7795), E = __webpack_require__.n(x), C = __webpack_require__(569), L = __webpack_require__.n(C), A = __webpack_require__(3565), I = __webpack_require__.n(A), D = __webpack_require__(9216), w = __webpack_require__.n(D), S = __webpack_require__(4589), O = __webpack_require__.n(S), F = __webpack_require__(7558), j = {};
        F.Z && F.Z.locals && (j.locals = F.Z.locals);
        var P, $ = 0, V = {};
        V.styleTagTransform = O(), V.setAttributes = I(), V.insert = L().bind(null, "head"), V.domAPI = E(), V.insertStyleElement = w(), j.use = function(d) {
          return V.options = d || {}, $++ || (P = y()(F.Z, V)), j;
        }, j.unuse = function() {
          $ > 0 && !--$ && (P(), P = null);
        };
        var q = j;
        function ee(d) {
          var c, o, s, u;
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.fLW)("vConsole"), (0, e.Ljt)(c, "class", "vc-switch"), (0, e.czc)(c, "right", d[2].x + "px"), (0, e.czc)(c, "bottom", d[2].y + "px"), (0, e.czc)(c, "display", d[0] ? "block" : "none");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o), d[8](c), s || (u = [(0, e.oLt)(c, "touchstart", d[3], { passive: !1 }), (0, e.oLt)(c, "touchend", d[4], { passive: !1 }), (0, e.oLt)(c, "touchmove", d[5], { passive: !1 }), (0, e.oLt)(c, "click", d[7])], s = !0);
          }, p: function(h, p) {
            var v = p[0];
            4 & v && (0, e.czc)(c, "right", h[2].x + "px"), 4 & v && (0, e.czc)(c, "bottom", h[2].y + "px"), 1 & v && (0, e.czc)(c, "display", h[0] ? "block" : "none");
          }, i: e.ZTd, o: e.ZTd, d: function(h) {
            h && (0, e.ogt)(c), d[8](null), s = !1, (0, e.j7q)(u);
          } };
        }
        function re(d, c, o) {
          var s, u = c.show, h = u === void 0 || u, p = c.position, v = p === void 0 ? { x: 0, y: 0 } : p, b = { hasMoved: !1, x: 0, y: 0, startX: 0, startY: 0, endX: 0, endY: 0 }, T = { x: 0, y: 0 };
          (0, g.H3)(function() {
            q.use();
          }), (0, g.ev)(function() {
            q.unuse();
          });
          var k = function(M, W) {
            var N = B(M, W);
            M = N[0], W = N[1], b.x = M, b.y = W, o(2, T.x = M, T), o(2, T.y = W, T), t.po("switch_x", M + ""), t.po("switch_y", W + "");
          }, B = function(M, W) {
            var N = Math.max(document.documentElement.offsetWidth, window.innerWidth), z = Math.max(document.documentElement.offsetHeight, window.innerHeight);
            return M + s.offsetWidth > N && (M = N - s.offsetWidth), W + s.offsetHeight > z && (W = z - s.offsetHeight), M < 0 && (M = 0), W < 20 && (W = 20), [M, W];
          };
          return d.$$set = function(M) {
            "show" in M && o(0, h = M.show), "position" in M && o(6, v = M.position);
          }, d.$$.update = function() {
            66 & d.$$.dirty && s && k(v.x, v.y);
          }, [h, s, T, function(M) {
            b.startX = M.touches[0].pageX, b.startY = M.touches[0].pageY, b.hasMoved = !1;
          }, function(M) {
            b.hasMoved && (b.startX = 0, b.startY = 0, b.hasMoved = !1, k(b.endX, b.endY));
          }, function(M) {
            if (!(M.touches.length <= 0)) {
              var W = M.touches[0].pageX - b.startX, N = M.touches[0].pageY - b.startY, z = Math.floor(b.x - W), Z = Math.floor(b.y - N), oe = B(z, Z);
              z = oe[0], Z = oe[1], o(2, T.x = z, T), o(2, T.y = Z, T), b.endX = z, b.endY = Z, b.hasMoved = !0, M.preventDefault();
            }
          }, v, function(M) {
            e.cKT.call(this, d, M);
          }, function(M) {
            e.VnY[M ? "unshift" : "push"](function() {
              o(1, s = M);
            });
          }];
        }
        var ye = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, re, ee, e.N8, { show: 0, position: 6 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "show", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ show: o }), (0, e.yl1)();
          } }, { key: "position", get: function() {
            return this.$$.ctx[6];
          }, set: function(o) {
            this.$$set({ position: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), ce = ye;
        function Q(d) {
          var c, o;
          return { c: function() {
            c = (0, e.bGB)("div"), (0, e.Ljt)(c, "id", o = "__vc_plug_" + d[0]), (0, e.Ljt)(c, "class", "vc-plugin-box"), (0, e.VHj)(c, "vc-fixed-height", d[1]), (0, e.VHj)(c, "vc-actived", d[2]);
          }, m: function(s, u) {
            (0, e.$Tr)(s, c, u), d[6](c);
          }, p: function(s, u) {
            var h = u[0];
            1 & h && o !== (o = "__vc_plug_" + s[0]) && (0, e.Ljt)(c, "id", o), 2 & h && (0, e.VHj)(c, "vc-fixed-height", s[1]), 4 & h && (0, e.VHj)(c, "vc-actived", s[2]);
          }, i: e.ZTd, o: e.ZTd, d: function(s) {
            s && (0, e.ogt)(c), d[6](null);
          } };
        }
        function se(d, c, o) {
          var s = c.pluginId, u = s === void 0 ? "" : s, h = c.fixedHeight, p = h !== void 0 && h, v = c.actived, b = v !== void 0 && v, T = c.content, k = T === void 0 ? void 0 : T, B = void 0, M = void 0;
          return d.$$set = function(W) {
            "pluginId" in W && o(0, u = W.pluginId), "fixedHeight" in W && o(1, p = W.fixedHeight), "actived" in W && o(2, b = W.actived), "content" in W && o(4, k = W.content);
          }, d.$$.update = function() {
            57 & d.$$.dirty && M !== u && k && B && (o(5, M = u), o(3, B.innerHTML = "", B), (0, t.HD)(k) ? o(3, B.innerHTML = k, B) : (0, t.kK)(k) && B.appendChild(k));
          }, [u, p, b, B, k, M, function(W) {
            e.VnY[W ? "unshift" : "push"](function() {
              o(3, B = W), o(5, M), o(0, u), o(4, k);
            });
          }];
        }
        var fe = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, se, Q, e.N8, { pluginId: 0, fixedHeight: 1, actived: 2, content: 4 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "pluginId", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ pluginId: o }), (0, e.yl1)();
          } }, { key: "fixedHeight", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ fixedHeight: o }), (0, e.yl1)();
          } }, { key: "actived", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ actived: o }), (0, e.yl1)();
          } }, { key: "content", get: function() {
            return this.$$.ctx[4];
          }, set: function(o) {
            this.$$set({ content: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), G = fe, K = __webpack_require__(4687), de = __webpack_require__(3283), ve = {};
        de.Z && de.Z.locals && (ve.locals = de.Z.locals);
        var ae, J = 0, U = {};
        U.styleTagTransform = O(), U.setAttributes = I(), U.insert = L().bind(null, "head"), U.domAPI = E(), U.insertStyleElement = w(), ve.use = function(d) {
          return U.options = d || {}, J++ || (ae = y()(de.Z, U)), ve;
        }, ve.unuse = function() {
          J > 0 && !--J && (ae(), ae = null);
        };
        var X = ve;
        function ne(d, c, o) {
          var s = d.slice();
          return s[39] = c[o][0], s[40] = c[o][1], s;
        }
        function we(d, c, o) {
          var s = d.slice();
          return s[43] = c[o], s[45] = o, s;
        }
        function Oe(d, c, o) {
          var s = d.slice();
          return s[39] = c[o][0], s[40] = c[o][1], s;
        }
        function Xe(d, c, o) {
          var s = d.slice();
          return s[39] = c[o][0], s[40] = c[o][1], s;
        }
        function Ye(d, c, o) {
          var s = d.slice();
          return s[43] = c[o], s[45] = o, s;
        }
        function Pe(d, c, o) {
          var s = d.slice();
          return s[39] = c[o][0], s[40] = c[o][1], s;
        }
        function Ve(d) {
          var c, o, s, u, h, p = d[40].name + "";
          function v() {
            return d[25](d[40]);
          }
          return { c: function() {
            c = (0, e.bGB)("a"), o = (0, e.fLW)(p), (0, e.Ljt)(c, "class", "vc-tab"), (0, e.Ljt)(c, "id", s = "__vc_tab_" + d[40].id), (0, e.VHj)(c, "vc-actived", d[40].id === d[2]);
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), u || (h = (0, e.oLt)(c, "click", v), u = !0);
          }, p: function(b, T) {
            d = b, 8 & T[0] && p !== (p = d[40].name + "") && (0, e.rTO)(o, p), 8 & T[0] && s !== (s = "__vc_tab_" + d[40].id) && (0, e.Ljt)(c, "id", s), 12 & T[0] && (0, e.VHj)(c, "vc-actived", d[40].id === d[2]);
          }, d: function(b) {
            b && (0, e.ogt)(c), u = !1, h();
          } };
        }
        function Ze(d) {
          var c, o = d[40].hasTabPanel && Ve(d);
          return { c: function() {
            o && o.c(), c = (0, e.cSb)();
          }, m: function(s, u) {
            o && o.m(s, u), (0, e.$Tr)(s, c, u);
          }, p: function(s, u) {
            s[40].hasTabPanel ? o ? o.p(s, u) : ((o = Ve(s)).c(), o.m(c.parentNode, c)) : o && (o.d(1), o = null);
          }, d: function(s) {
            o && o.d(s), s && (0, e.ogt)(c);
          } };
        }
        function ot(d) {
          var c, o, s, u, h, p = d[43].name + "";
          function v() {
            for (var b, T = arguments.length, k = new Array(T), B = 0; B < T; B++)
              k[B] = arguments[B];
            return (b = d)[26].apply(b, [d[40], d[45]].concat(k));
          }
          return { c: function() {
            c = (0, e.bGB)("i"), o = (0, e.fLW)(p), (0, e.Ljt)(c, "class", s = "vc-toptab vc-topbar-" + d[40].id + " " + d[43].className), (0, e.VHj)(c, "vc-toggle", d[40].id === d[2]), (0, e.VHj)(c, "vc-actived", d[43].actived);
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), u || (h = (0, e.oLt)(c, "click", v), u = !0);
          }, p: function(b, T) {
            d = b, 8 & T[0] && p !== (p = d[43].name + "") && (0, e.rTO)(o, p), 8 & T[0] && s !== (s = "vc-toptab vc-topbar-" + d[40].id + " " + d[43].className) && (0, e.Ljt)(c, "class", s), 12 & T[0] && (0, e.VHj)(c, "vc-toggle", d[40].id === d[2]), 8 & T[0] && (0, e.VHj)(c, "vc-actived", d[43].actived);
          }, d: function(b) {
            b && (0, e.ogt)(c), u = !1, h();
          } };
        }
        function tt(d) {
          for (var c, o = d[40].topbarList, s = [], u = 0; u < o.length; u += 1)
            s[u] = ot(Ye(d, o, u));
          return { c: function() {
            for (var h = 0; h < s.length; h += 1)
              s[h].c();
            c = (0, e.cSb)();
          }, m: function(h, p) {
            for (var v = 0; v < s.length; v += 1)
              s[v].m(h, p);
            (0, e.$Tr)(h, c, p);
          }, p: function(h, p) {
            if (8204 & p[0]) {
              var v;
              for (o = h[40].topbarList, v = 0; v < o.length; v += 1) {
                var b = Ye(h, o, v);
                s[v] ? s[v].p(b, p) : (s[v] = ot(b), s[v].c(), s[v].m(c.parentNode, c));
              }
              for (; v < s.length; v += 1)
                s[v].d(1);
              s.length = o.length;
            }
          }, d: function(h) {
            (0, e.RMB)(s, h), h && (0, e.ogt)(c);
          } };
        }
        function Ge(d) {
          var c, o, s, u = G;
          function h(p) {
            var v;
            return { props: { pluginId: p[40].id, fixedHeight: (v = p[40].tabOptions) == null ? void 0 : v.fixedHeight, actived: p[40].id === p[2], content: p[40].content } };
          }
          return u && (c = new u(h(d))), { c: function() {
            c && (0, e.YCL)(c.$$.fragment), o = (0, e.cSb)();
          }, m: function(p, v) {
            c && (0, e.yef)(c, p, v), (0, e.$Tr)(p, o, v), s = !0;
          }, p: function(p, v) {
            var b, T = {};
            if (8 & v[0] && (T.pluginId = p[40].id), 8 & v[0] && (T.fixedHeight = (b = p[40].tabOptions) == null ? void 0 : b.fixedHeight), 12 & v[0] && (T.actived = p[40].id === p[2]), 8 & v[0] && (T.content = p[40].content), u !== (u = G)) {
              if (c) {
                (0, e.dvw)();
                var k = c;
                (0, e.etI)(k.$$.fragment, 1, 0, function() {
                  (0, e.vpE)(k, 1);
                }), (0, e.gbL)();
              }
              u ? (c = new u(h(p)), (0, e.YCL)(c.$$.fragment), (0, e.Ui)(c.$$.fragment, 1), (0, e.yef)(c, o.parentNode, o)) : c = null;
            } else
              u && c.$set(T);
          }, i: function(p) {
            s || (c && (0, e.Ui)(c.$$.fragment, p), s = !0);
          }, o: function(p) {
            c && (0, e.etI)(c.$$.fragment, p), s = !1;
          }, d: function(p) {
            p && (0, e.ogt)(o), c && (0, e.vpE)(c, p);
          } };
        }
        function We(d) {
          var c, o, s, u, h, p = d[43].name + "";
          function v() {
            for (var b, T = arguments.length, k = new Array(T), B = 0; B < T; B++)
              k[B] = arguments[B];
            return (b = d)[28].apply(b, [d[40], d[45]].concat(k));
          }
          return { c: function() {
            c = (0, e.bGB)("i"), o = (0, e.fLW)(p), (0, e.Ljt)(c, "class", s = "vc-tool vc-tool-" + d[40].id), (0, e.VHj)(c, "vc-global-tool", d[43].global), (0, e.VHj)(c, "vc-toggle", d[40].id === d[2]);
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), u || (h = (0, e.oLt)(c, "click", v), u = !0);
          }, p: function(b, T) {
            d = b, 8 & T[0] && p !== (p = d[43].name + "") && (0, e.rTO)(o, p), 8 & T[0] && s !== (s = "vc-tool vc-tool-" + d[40].id) && (0, e.Ljt)(c, "class", s), 8 & T[0] && (0, e.VHj)(c, "vc-global-tool", d[43].global), 12 & T[0] && (0, e.VHj)(c, "vc-toggle", d[40].id === d[2]);
          }, d: function(b) {
            b && (0, e.ogt)(c), u = !1, h();
          } };
        }
        function He(d) {
          for (var c, o = d[40].toolbarList, s = [], u = 0; u < o.length; u += 1)
            s[u] = We(we(d, o, u));
          return { c: function() {
            for (var h = 0; h < s.length; h += 1)
              s[h].c();
            c = (0, e.cSb)();
          }, m: function(h, p) {
            for (var v = 0; v < s.length; v += 1)
              s[v].m(h, p);
            (0, e.$Tr)(h, c, p);
          }, p: function(h, p) {
            if (16396 & p[0]) {
              var v;
              for (o = h[40].toolbarList, v = 0; v < o.length; v += 1) {
                var b = we(h, o, v);
                s[v] ? s[v].p(b, p) : (s[v] = We(b), s[v].c(), s[v].m(c.parentNode, c));
              }
              for (; v < s.length; v += 1)
                s[v].d(1);
              s.length = o.length;
            }
          }, d: function(h) {
            (0, e.RMB)(s, h), h && (0, e.ogt)(c);
          } };
        }
        function ft(d) {
          var c, o, s, u, h, p, v, b, T, k, B, M, W, N, z, Z, oe, ue, pe, Ie, Le;
          function ze(Te) {
            d[23](Te);
          }
          function qe(Te) {
            d[24](Te);
          }
          var Je = {};
          d[0] !== void 0 && (Je.show = d[0]), d[1] !== void 0 && (Je.position = d[1]), o = new ce({ props: Je }), e.VnY.push(function() {
            return (0, e.akz)(o, "show", ze);
          }), e.VnY.push(function() {
            return (0, e.akz)(o, "position", qe);
          }), o.$on("click", d[10]);
          for (var Re = Object.entries(d[3]), Ce = [], Qe = 0; Qe < Re.length; Qe += 1)
            Ce[Qe] = Ze(Pe(d, Re, Qe));
          for (var _t = Object.entries(d[3]), et = [], Ke = 0; Ke < _t.length; Ke += 1)
            et[Ke] = tt(Xe(d, _t, Ke));
          for (var Me = Object.entries(d[3]), _e = [], xe = 0; xe < Me.length; xe += 1)
            _e[xe] = Ge(Oe(d, Me, xe));
          for (var rt = function(Te) {
            return (0, e.etI)(_e[Te], 1, 1, function() {
              _e[Te] = null;
            });
          }, he = Object.entries(d[3]), Se = [], Ne = 0; Ne < he.length; Ne += 1)
            Se[Ne] = He(ne(d, he, Ne));
          return { c: function() {
            var Te, je;
            c = (0, e.bGB)("div"), (0, e.YCL)(o.$$.fragment), h = (0, e.DhX)(), p = (0, e.bGB)("div"), v = (0, e.DhX)(), b = (0, e.bGB)("div"), T = (0, e.bGB)("div");
            for (var dt = 0; dt < Ce.length; dt += 1)
              Ce[dt].c();
            k = (0, e.DhX)(), B = (0, e.bGB)("div");
            for (var gt = 0; gt < et.length; gt += 1)
              et[gt].c();
            M = (0, e.DhX)(), W = (0, e.bGB)("div");
            for (var Et = 0; Et < _e.length; Et += 1)
              _e[Et].c();
            N = (0, e.DhX)(), z = (0, e.bGB)("div");
            for (var st = 0; st < Se.length; st += 1)
              Se[st].c();
            Z = (0, e.DhX)(), (oe = (0, e.bGB)("i")).textContent = "Hide", (0, e.Ljt)(p, "class", "vc-mask"), (0, e.czc)(p, "display", d[8] ? "block" : "none"), (0, e.Ljt)(T, "class", "vc-tabbar"), (0, e.Ljt)(B, "class", "vc-topbar"), (0, e.Ljt)(W, "class", "vc-content"), (0, e.VHj)(W, "vc-has-topbar", ((Te = d[3][d[2]]) == null || (je = Te.topbarList) == null ? void 0 : je.length) > 0), (0, e.Ljt)(oe, "class", "vc-tool vc-global-tool vc-tool-last vc-hide"), (0, e.Ljt)(z, "class", "vc-toolbar"), (0, e.Ljt)(b, "class", "vc-panel"), (0, e.czc)(b, "display", d[7] ? "block" : "none"), (0, e.Ljt)(c, "id", "__vconsole"), (0, e.Ljt)(c, "style", ue = d[5] ? "font-size:" + d[5] + ";" : ""), (0, e.Ljt)(c, "data-theme", d[4]), (0, e.VHj)(c, "vc-toggle", d[6]);
          }, m: function(Te, je) {
            (0, e.$Tr)(Te, c, je), (0, e.yef)(o, c, null), (0, e.R3I)(c, h), (0, e.R3I)(c, p), (0, e.R3I)(c, v), (0, e.R3I)(c, b), (0, e.R3I)(b, T);
            for (var dt = 0; dt < Ce.length; dt += 1)
              Ce[dt].m(T, null);
            (0, e.R3I)(b, k), (0, e.R3I)(b, B);
            for (var gt = 0; gt < et.length; gt += 1)
              et[gt].m(B, null);
            (0, e.R3I)(b, M), (0, e.R3I)(b, W);
            for (var Et = 0; Et < _e.length; Et += 1)
              _e[Et].m(W, null);
            d[27](W), (0, e.R3I)(b, N), (0, e.R3I)(b, z);
            for (var st = 0; st < Se.length; st += 1)
              Se[st].m(z, null);
            (0, e.R3I)(z, Z), (0, e.R3I)(z, oe), pe = !0, Ie || (Le = [(0, e.oLt)(p, "click", d[11]), (0, e.oLt)(W, "touchstart", d[15]), (0, e.oLt)(W, "touchmove", d[16]), (0, e.oLt)(W, "touchend", d[17]), (0, e.oLt)(W, "scroll", d[18]), (0, e.oLt)(oe, "click", d[11]), (0, e.oLt)(c, "touchstart", d[19].touchStart, { passive: !1, capture: !0 }), (0, e.oLt)(c, "touchmove", d[19].touchMove, { passive: !1, capture: !0 }), (0, e.oLt)(c, "touchend", d[19].touchEnd, { passive: !1, capture: !0 })], Ie = !0);
          }, p: function(Te, je) {
            var dt, gt, Et = {};
            if (!s && 1 & je[0] && (s = !0, Et.show = Te[0], (0, e.hjT)(function() {
              return s = !1;
            })), !u && 2 & je[0] && (u = !0, Et.position = Te[1], (0, e.hjT)(function() {
              return u = !1;
            })), o.$set(Et), (!pe || 256 & je[0]) && (0, e.czc)(p, "display", Te[8] ? "block" : "none"), 4108 & je[0]) {
              var st;
              for (Re = Object.entries(Te[3]), st = 0; st < Re.length; st += 1) {
                var Ht = Pe(Te, Re, st);
                Ce[st] ? Ce[st].p(Ht, je) : (Ce[st] = Ze(Ht), Ce[st].c(), Ce[st].m(T, null));
              }
              for (; st < Ce.length; st += 1)
                Ce[st].d(1);
              Ce.length = Re.length;
            }
            if (8204 & je[0]) {
              var wt;
              for (_t = Object.entries(Te[3]), wt = 0; wt < _t.length; wt += 1) {
                var zt = Xe(Te, _t, wt);
                et[wt] ? et[wt].p(zt, je) : (et[wt] = tt(zt), et[wt].c(), et[wt].m(B, null));
              }
              for (; wt < et.length; wt += 1)
                et[wt].d(1);
              et.length = _t.length;
            }
            if (12 & je[0]) {
              var mt;
              for (Me = Object.entries(Te[3]), mt = 0; mt < Me.length; mt += 1) {
                var Yt = Oe(Te, Me, mt);
                _e[mt] ? (_e[mt].p(Yt, je), (0, e.Ui)(_e[mt], 1)) : (_e[mt] = Ge(Yt), _e[mt].c(), (0, e.Ui)(_e[mt], 1), _e[mt].m(W, null));
              }
              for ((0, e.dvw)(), mt = Me.length; mt < _e.length; mt += 1)
                rt(mt);
              (0, e.gbL)();
            }
            if (12 & je[0] && (0, e.VHj)(W, "vc-has-topbar", ((dt = Te[3][Te[2]]) == null || (gt = dt.topbarList) == null ? void 0 : gt.length) > 0), 16396 & je[0]) {
              var yt;
              for (he = Object.entries(Te[3]), yt = 0; yt < he.length; yt += 1) {
                var on = ne(Te, he, yt);
                Se[yt] ? Se[yt].p(on, je) : (Se[yt] = He(on), Se[yt].c(), Se[yt].m(z, Z));
              }
              for (; yt < Se.length; yt += 1)
                Se[yt].d(1);
              Se.length = he.length;
            }
            (!pe || 128 & je[0]) && (0, e.czc)(b, "display", Te[7] ? "block" : "none"), (!pe || 32 & je[0] && ue !== (ue = Te[5] ? "font-size:" + Te[5] + ";" : "")) && (0, e.Ljt)(c, "style", ue), (!pe || 16 & je[0]) && (0, e.Ljt)(c, "data-theme", Te[4]), 64 & je[0] && (0, e.VHj)(c, "vc-toggle", Te[6]);
          }, i: function(Te) {
            if (!pe) {
              (0, e.Ui)(o.$$.fragment, Te);
              for (var je = 0; je < Me.length; je += 1)
                (0, e.Ui)(_e[je]);
              pe = !0;
            }
          }, o: function(Te) {
            (0, e.etI)(o.$$.fragment, Te), _e = _e.filter(Boolean);
            for (var je = 0; je < _e.length; je += 1)
              (0, e.etI)(_e[je]);
            pe = !1;
          }, d: function(Te) {
            Te && (0, e.ogt)(c), (0, e.vpE)(o), (0, e.RMB)(Ce, Te), (0, e.RMB)(et, Te), (0, e.RMB)(_e, Te), d[27](null), (0, e.RMB)(Se, Te), Ie = !1, (0, e.j7q)(Le);
          } };
        }
        function Tt(d, c, o) {
          var s, u, h = c.theme, p = h === void 0 ? "" : h, v = c.disableScrolling, b = v !== void 0 && v, T = c.show, k = T !== void 0 && T, B = c.showSwitchButton, M = B === void 0 || B, W = c.switchButtonPosition, N = W === void 0 ? { x: 0, y: 0 } : W, z = c.activedPluginId, Z = z === void 0 ? "" : z, oe = c.pluginList, ue = oe === void 0 ? {} : oe, pe = (0, g.x)(), Ie = !1, Le = "", ze = !1, qe = !1, Je = !1, Re = !0, Ce = 0, Qe = null, _t = {};
          (0, g.H3)(function() {
            var he = document.querySelectorAll('[name="viewport"]');
            if (he && he[0]) {
              var Se = (he[he.length - 1].getAttribute("content") || "").match(/initial\-scale\=\d+(\.\d+)?/), Ne = Se ? parseFloat(Se[0].split("=")[1]) : 1;
              Ne !== 1 && o(5, Le = Math.floor(1 / Ne * 13) + "px");
            }
            X.use && X.use(), s = K.x.subscribe(function(Te) {
              k && Ce !== Te.updateTime && (Ce = Te.updateTime, et());
            });
          }), (0, g.ev)(function() {
            X.unuse && X.unuse(), s && s();
          });
          var et = function() {
            !b && Re && u && o(9, u.scrollTop = u.scrollHeight - u.offsetHeight, u);
          }, Ke = function(he) {
            he !== Z && (o(2, Z = he), pe("changePanel", { pluginId: he }), setTimeout(function() {
              u && o(9, u.scrollTop = _t[Z] || 0, u);
            }, 0));
          }, Me = function(he, Se, Ne) {
            var Te = ue[Se].topbarList[Ne], je = !0;
            if (t.mf(Te.onClick) && (je = Te.onClick.call(he.target, he, Te.data)), je !== !1) {
              for (var dt = 0; dt < ue[Se].topbarList.length; dt++)
                o(3, ue[Se].topbarList[dt].actived = Ne === dt, ue);
              o(3, ue);
            }
          }, _e = function(he, Se, Ne) {
            var Te = ue[Se].toolbarList[Ne];
            t.mf(Te.onClick) && Te.onClick.call(he.target, he, Te.data);
          }, xe = { tapTime: 700, tapBoundary: 10, lastTouchStartTime: 0, touchstartX: 0, touchstartY: 0, touchHasMoved: !1, targetElem: null }, rt = { touchStart: function(he) {
            if (xe.lastTouchStartTime === 0) {
              var Se = he.targetTouches[0];
              xe.touchstartX = Se.pageX, xe.touchstartY = Se.pageY, xe.lastTouchStartTime = he.timeStamp, xe.targetElem = he.target.nodeType === Node.TEXT_NODE ? he.target.parentNode : he.target;
            }
          }, touchMove: function(he) {
            var Se = he.changedTouches[0];
            (Math.abs(Se.pageX - xe.touchstartX) > xe.tapBoundary || Math.abs(Se.pageY - xe.touchstartY) > xe.tapBoundary) && (xe.touchHasMoved = !0);
          }, touchEnd: function(he) {
            if (xe.touchHasMoved === !1 && he.timeStamp - xe.lastTouchStartTime < xe.tapTime && xe.targetElem != null) {
              var Se = !1;
              switch (xe.targetElem.tagName.toLowerCase()) {
                case "textarea":
                  Se = !0;
                  break;
                case "select":
                  Se = !xe.targetElem.disabled && !xe.targetElem.readOnly;
                  break;
                case "input":
                  switch (xe.targetElem.type) {
                    case "button":
                    case "checkbox":
                    case "file":
                    case "image":
                    case "radio":
                    case "submit":
                      Se = !1;
                      break;
                    default:
                      Se = !xe.targetElem.disabled && !xe.targetElem.readOnly;
                  }
              }
              Se ? xe.targetElem.focus() : he.preventDefault();
              var Ne = he.changedTouches[0], Te = new MouseEvent("click", { bubbles: !0, cancelable: !0, view: window, screenX: Ne.screenX, screenY: Ne.screenY, clientX: Ne.clientX, clientY: Ne.clientY });
              xe.targetElem.dispatchEvent(Te);
            }
            xe.lastTouchStartTime = 0, xe.touchHasMoved = !1, xe.targetElem = null;
          } };
          return d.$$set = function(he) {
            "theme" in he && o(4, p = he.theme), "disableScrolling" in he && o(20, b = he.disableScrolling), "show" in he && o(21, k = he.show), "showSwitchButton" in he && o(0, M = he.showSwitchButton), "switchButtonPosition" in he && o(1, N = he.switchButtonPosition), "activedPluginId" in he && o(2, Z = he.activedPluginId), "pluginList" in he && o(3, ue = he.pluginList);
          }, d.$$.update = function() {
            6291456 & d.$$.dirty[0] && (k === !0 ? (o(7, qe = !0), o(8, Je = !0), Qe && clearTimeout(Qe), o(22, Qe = setTimeout(function() {
              o(6, ze = !0), et();
            }, 10))) : (o(6, ze = !1), Qe && clearTimeout(Qe), o(22, Qe = setTimeout(function() {
              o(7, qe = !1), o(8, Je = !1);
            }, 330))));
          }, [M, N, Z, ue, p, Le, ze, qe, Je, u, function(he) {
            pe("show", { show: !0 });
          }, function(he) {
            pe("show", { show: !1 });
          }, Ke, Me, _e, function(he) {
            if (!(he.target.tagName === "INPUT" || he.target.tagName === "TEXTAREA")) {
              var Se = !1;
              if (typeof window.getComputedStyle == "function") {
                var Ne = window.getComputedStyle(he.target);
                Ne.overflow !== "auto" && Ne.overflow !== "initial" && Ne.overflow !== "scroll" || (Se = !0);
              }
              if (!Se) {
                var Te = u.scrollTop, je = u.scrollHeight, dt = Te + u.offsetHeight;
                Te === 0 ? (o(9, u.scrollTop = 1, u), u.scrollTop === 0 && (Ie = !0)) : dt === je && (o(9, u.scrollTop = Te - 1, u), u.scrollTop === Te && (Ie = !0));
              }
            }
          }, function(he) {
            Ie && he.preventDefault();
          }, function(he) {
            Ie = !1;
          }, function(he) {
            k && (Re = u.scrollTop + u.offsetHeight >= u.scrollHeight - 50, _t[Z] = u.scrollTop);
          }, rt, b, k, Qe, function(he) {
            o(0, M = he);
          }, function(he) {
            o(1, N = he);
          }, function(he) {
            return Ke(he.id);
          }, function(he, Se, Ne) {
            return Me(Ne, he.id, Se);
          }, function(he) {
            e.VnY[he ? "unshift" : "push"](function() {
              o(9, u = he);
            });
          }, function(he, Se, Ne) {
            return _e(Ne, he.id, Se);
          }];
        }
        var Lt = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, Tt, ft, e.N8, { theme: 4, disableScrolling: 20, show: 21, showSwitchButton: 0, switchButtonPosition: 1, activedPluginId: 2, pluginList: 3 }, null, [-1, -1]), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "theme", get: function() {
            return this.$$.ctx[4];
          }, set: function(o) {
            this.$$set({ theme: o }), (0, e.yl1)();
          } }, { key: "disableScrolling", get: function() {
            return this.$$.ctx[20];
          }, set: function(o) {
            this.$$set({ disableScrolling: o }), (0, e.yl1)();
          } }, { key: "show", get: function() {
            return this.$$.ctx[21];
          }, set: function(o) {
            this.$$set({ show: o }), (0, e.yl1)();
          } }, { key: "showSwitchButton", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ showSwitchButton: o }), (0, e.yl1)();
          } }, { key: "switchButtonPosition", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ switchButtonPosition: o }), (0, e.yl1)();
          } }, { key: "activedPluginId", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ activedPluginId: o }), (0, e.yl1)();
          } }, { key: "pluginList", get: function() {
            return this.$$.ctx[3];
          }, set: function(o) {
            this.$$set({ pluginList: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), en = Lt, Pt = function() {
          function d(o, s) {
            s === void 0 && (s = "newPlugin"), this.isReady = !1, this.eventMap = /* @__PURE__ */ new Map(), this.exporter = void 0, this._id = void 0, this._name = void 0, this._vConsole = void 0, this.id = o, this.name = s, this.isReady = !1;
          }
          var c = d.prototype;
          return c.on = function(o, s) {
            return this.eventMap.set(o, s), this;
          }, c.onRemove = function() {
            this.unbindExporter();
          }, c.trigger = function(o, s) {
            var u = this.eventMap.get(o);
            if (typeof u == "function")
              u.call(this, s);
            else {
              var h = "on" + o.charAt(0).toUpperCase() + o.slice(1);
              typeof this[h] == "function" && this[h].call(this, s);
            }
            return this;
          }, c.bindExporter = function() {
            if (this._vConsole && this.exporter) {
              var o = this.id === "default" ? "log" : this.id;
              this._vConsole[o] = this.exporter;
            }
          }, c.unbindExporter = function() {
            var o = this.id === "default" ? "log" : this.id;
            this._vConsole && this._vConsole[o] && (this._vConsole[o] = void 0);
          }, c.getUniqueID = function(o) {
            return o === void 0 && (o = ""), (0, t.QI)(o);
          }, (0, f.Z)(d, [{ key: "id", get: function() {
            return this._id;
          }, set: function(o) {
            if (typeof o != "string")
              throw "[vConsole] Plugin ID must be a string.";
            if (!o)
              throw "[vConsole] Plugin ID cannot be empty.";
            this._id = o.toLowerCase();
          } }, { key: "name", get: function() {
            return this._name;
          }, set: function(o) {
            if (typeof o != "string")
              throw "[vConsole] Plugin name must be a string.";
            if (!o)
              throw "[vConsole] Plugin name cannot be empty.";
            this._name = o;
          } }, { key: "vConsole", get: function() {
            return this._vConsole || void 0;
          }, set: function(o) {
            if (!o)
              throw "[vConsole] vConsole cannot be empty";
            this._vConsole = o, this.bindExporter();
          } }]), d;
        }(), St = function(d) {
          function c(s, u, h, p) {
            var v;
            return (v = d.call(this, s, u) || this).CompClass = void 0, v.compInstance = void 0, v.initialProps = void 0, v.CompClass = h, v.initialProps = p, v;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            this.isReady = !0;
          }, o.onRenderTab = function(s) {
            var u = document.createElement("div"), h = this.compInstance = new this.CompClass({ target: u, props: this.initialProps });
            s(u.firstElementChild, h.options);
          }, o.onRemove = function() {
            d.prototype.onRemove && d.prototype.onRemove.call(this), this.compInstance && this.compInstance.$destroy();
          }, c;
        }(Pt), $t = __webpack_require__(8665), sn = __webpack_require__(9923), bt = __webpack_require__(8702);
        function Vt(d) {
          var c, o;
          return (c = new bt.Z({ props: { name: d[0] ? "success" : "copy" } })).$on("click", d[1]), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            1 & u[0] && (h.name = s[0] ? "success" : "copy"), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function tn(d, c, o) {
          var s = c.content, u = s === void 0 ? "" : s, h = c.handler, p = h === void 0 ? void 0 : h, v = { target: document.documentElement }, b = !1;
          return d.$$set = function(T) {
            "content" in T && o(2, u = T.content), "handler" in T && o(3, p = T.handler);
          }, [b, function(T) {
            (function(k, B) {
              var M = (B === void 0 ? {} : B).target, W = M === void 0 ? document.body : M, N = document.createElement("textarea"), z = document.activeElement;
              N.value = k, N.setAttribute("readonly", ""), N.style.contain = "strict", N.style.position = "absolute", N.style.left = "-9999px", N.style.fontSize = "12pt";
              var Z = document.getSelection(), oe = !1;
              Z.rangeCount > 0 && (oe = Z.getRangeAt(0)), W.append(N), N.select(), N.selectionStart = 0, N.selectionEnd = k.length;
              var ue = !1;
              try {
                ue = document.execCommand("copy");
              } catch {
              }
              N.remove(), oe && (Z.removeAllRanges(), Z.addRange(oe)), z && z.focus();
            })(t.mf(p) ? p(u) || "" : t.Kn(u) || t.kJ(u) ? t.hZ(u, { maxDepth: 10, keyMaxLen: 1e4, pretty: !1, standardJSON: !0 }) : u, v), o(0, b = !0), setTimeout(function() {
              o(0, b = !1);
            }, 600);
          }, u, p];
        }
        var Gt = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, tn, Vt, e.N8, { content: 2, handler: 3 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "content", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ content: o }), (0, e.yl1)();
          } }, { key: "handler", get: function() {
            return this.$$.ctx[3];
          }, set: function(o) {
            this.$$set({ handler: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), xt = Gt, Xt = __webpack_require__(845), me = {};
        Xt.Z && Xt.Z.locals && (me.locals = Xt.Z.locals);
        var Ee, Ae = 0, De = {};
        De.styleTagTransform = O(), De.setAttributes = I(), De.insert = L().bind(null, "head"), De.domAPI = E(), De.insertStyleElement = w(), me.use = function(d) {
          return De.options = d || {}, Ae++ || (Ee = y()(Xt.Z, De)), me;
        }, me.unuse = function() {
          Ae > 0 && !--Ae && (Ee(), Ee = null);
        };
        var it = me;
        function pt(d) {
          var c, o, s, u = t.rE(d[1]) + "";
          return { c: function() {
            c = (0, e.bGB)("i"), o = (0, e.fLW)(u), s = (0, e.fLW)(":"), (0, e.Ljt)(c, "class", "vc-log-key"), (0, e.VHj)(c, "vc-log-key-symbol", d[2] === "symbol"), (0, e.VHj)(c, "vc-log-key-private", d[2] === "private");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o), (0, e.$Tr)(h, s, p);
          }, p: function(h, p) {
            2 & p && u !== (u = t.rE(h[1]) + "") && (0, e.rTO)(o, u), 4 & p && (0, e.VHj)(c, "vc-log-key-symbol", h[2] === "symbol"), 4 & p && (0, e.VHj)(c, "vc-log-key-private", h[2] === "private");
          }, d: function(h) {
            h && (0, e.ogt)(c), h && (0, e.ogt)(s);
          } };
        }
        function Bt(d) {
          var c, o, s, u, h = d[1] !== void 0 && pt(d);
          return { c: function() {
            h && h.c(), c = (0, e.DhX)(), o = (0, e.bGB)("i"), s = (0, e.fLW)(d[3]), (0, e.Ljt)(o, "class", u = "vc-log-val vc-log-val-" + d[4]), (0, e.Ljt)(o, "style", d[0]), (0, e.VHj)(o, "vc-log-val-haskey", d[1] !== void 0);
          }, m: function(p, v) {
            h && h.m(p, v), (0, e.$Tr)(p, c, v), (0, e.$Tr)(p, o, v), (0, e.R3I)(o, s);
          }, p: function(p, v) {
            var b = v[0];
            p[1] !== void 0 ? h ? h.p(p, b) : ((h = pt(p)).c(), h.m(c.parentNode, c)) : h && (h.d(1), h = null), 8 & b && (0, e.rTO)(s, p[3]), 16 & b && u !== (u = "vc-log-val vc-log-val-" + p[4]) && (0, e.Ljt)(o, "class", u), 1 & b && (0, e.Ljt)(o, "style", p[0]), 18 & b && (0, e.VHj)(o, "vc-log-val-haskey", p[1] !== void 0);
          }, i: e.ZTd, o: e.ZTd, d: function(p) {
            h && h.d(p), p && (0, e.ogt)(c), p && (0, e.ogt)(o);
          } };
        }
        function H(d, c, o) {
          var s = c.origData, u = c.style, h = u === void 0 ? "" : u, p = c.dataKey, v = p === void 0 ? void 0 : p, b = c.keyType, T = b === void 0 ? "" : b, k = "", B = "", M = !1;
          return (0, g.H3)(function() {
            it.use();
          }), (0, g.ev)(function() {
            it.unuse();
          }), d.$$set = function(W) {
            "origData" in W && o(5, s = W.origData), "style" in W && o(0, h = W.style), "dataKey" in W && o(1, v = W.dataKey), "keyType" in W && o(2, T = W.keyType);
          }, d.$$.update = function() {
            if (122 & d.$$.dirty) {
              o(6, M = v !== void 0);
              var W = (0, $t.LH)(s, M);
              o(4, B = W.valueType), o(3, k = W.text), M || B !== "string" || o(3, k = k.replace(/\\n/g, `
`).replace(/\\t/g, "    "));
            }
          }, [h, v, T, k, B, s, M];
        }
        var te = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, H, Bt, e.AqN, { origData: 5, style: 0, dataKey: 1, keyType: 2 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "origData", get: function() {
            return this.$$.ctx[5];
          }, set: function(o) {
            this.$$set({ origData: o }), (0, e.yl1)();
          } }, { key: "style", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ style: o }), (0, e.yl1)();
          } }, { key: "dataKey", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ dataKey: o }), (0, e.yl1)();
          } }, { key: "keyType", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ keyType: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), Y = te, ie = __webpack_require__(1237), ge = {};
        ie.Z && ie.Z.locals && (ge.locals = ie.Z.locals);
        var ke, Be = 0, ut = {};
        ut.styleTagTransform = O(), ut.setAttributes = I(), ut.insert = L().bind(null, "head"), ut.domAPI = E(), ut.insertStyleElement = w(), ge.use = function(d) {
          return ut.options = d || {}, Be++ || (ke = y()(ie.Z, ut)), ge;
        }, ge.unuse = function() {
          Be > 0 && !--Be && (ke(), ke = null);
        };
        var Ct = ge;
        function ht(d, c, o) {
          var s = d.slice();
          return s[19] = c[o], s[21] = o, s;
        }
        function an(d, c, o) {
          var s = d.slice();
          return s[19] = c[o], s;
        }
        function bn(d, c, o) {
          var s = d.slice();
          return s[19] = c[o], s[21] = o, s;
        }
        function Ft(d) {
          for (var c, o, s, u, h, p, v, b = [], T = /* @__PURE__ */ new Map(), k = [], B = /* @__PURE__ */ new Map(), M = [], W = /* @__PURE__ */ new Map(), N = d[7], z = function(_e) {
            return _e[19];
          }, Z = 0; Z < N.length; Z += 1) {
            var oe = bn(d, N, Z), ue = z(oe);
            T.set(ue, b[Z] = Wt(ue, oe));
          }
          for (var pe = d[11] < d[7].length && ln(d), Ie = d[9], Le = function(_e) {
            return _e[19];
          }, ze = 0; ze < Ie.length; ze += 1) {
            var qe = an(d, Ie, ze), Je = Le(qe);
            B.set(Je, k[ze] = xn(Je, qe));
          }
          for (var Re = d[8], Ce = function(_e) {
            return _e[19];
          }, Qe = 0; Qe < Re.length; Qe += 1) {
            var _t = ht(d, Re, Qe), et = Ce(_t);
            W.set(et, M[Qe] = Cn(et, _t));
          }
          var Ke = d[12] < d[8].length && An(d), Me = d[10] && cn(d);
          return { c: function() {
            c = (0, e.bGB)("div");
            for (var _e = 0; _e < b.length; _e += 1)
              b[_e].c();
            o = (0, e.DhX)(), pe && pe.c(), s = (0, e.DhX)();
            for (var xe = 0; xe < k.length; xe += 1)
              k[xe].c();
            u = (0, e.DhX)();
            for (var rt = 0; rt < M.length; rt += 1)
              M[rt].c();
            h = (0, e.DhX)(), Ke && Ke.c(), p = (0, e.DhX)(), Me && Me.c(), (0, e.Ljt)(c, "class", "vc-log-tree-child");
          }, m: function(_e, xe) {
            (0, e.$Tr)(_e, c, xe);
            for (var rt = 0; rt < b.length; rt += 1)
              b[rt].m(c, null);
            (0, e.R3I)(c, o), pe && pe.m(c, null), (0, e.R3I)(c, s);
            for (var he = 0; he < k.length; he += 1)
              k[he].m(c, null);
            (0, e.R3I)(c, u);
            for (var Se = 0; Se < M.length; Se += 1)
              M[Se].m(c, null);
            (0, e.R3I)(c, h), Ke && Ke.m(c, null), (0, e.R3I)(c, p), Me && Me.m(c, null), v = !0;
          }, p: function(_e, xe) {
            67721 & xe && (N = _e[7], (0, e.dvw)(), b = (0, e.GQg)(b, xe, z, 1, _e, N, T, c, e.cly, Wt, o, bn), (0, e.gbL)()), _e[11] < _e[7].length ? pe ? pe.p(_e, xe) : ((pe = ln(_e)).c(), pe.m(c, s)) : pe && (pe.d(1), pe = null), 66057 & xe && (Ie = _e[9], (0, e.dvw)(), k = (0, e.GQg)(k, xe, Le, 1, _e, Ie, B, c, e.cly, xn, u, an), (0, e.gbL)()), 69897 & xe && (Re = _e[8], (0, e.dvw)(), M = (0, e.GQg)(M, xe, Ce, 1, _e, Re, W, c, e.cly, Cn, h, ht), (0, e.gbL)()), _e[12] < _e[8].length ? Ke ? Ke.p(_e, xe) : ((Ke = An(_e)).c(), Ke.m(c, p)) : Ke && (Ke.d(1), Ke = null), _e[10] ? Me ? (Me.p(_e, xe), 1024 & xe && (0, e.Ui)(Me, 1)) : ((Me = cn(_e)).c(), (0, e.Ui)(Me, 1), Me.m(c, null)) : Me && ((0, e.dvw)(), (0, e.etI)(Me, 1, 1, function() {
              Me = null;
            }), (0, e.gbL)());
          }, i: function(_e) {
            if (!v) {
              for (var xe = 0; xe < N.length; xe += 1)
                (0, e.Ui)(b[xe]);
              for (var rt = 0; rt < Ie.length; rt += 1)
                (0, e.Ui)(k[rt]);
              for (var he = 0; he < Re.length; he += 1)
                (0, e.Ui)(M[he]);
              (0, e.Ui)(Me), v = !0;
            }
          }, o: function(_e) {
            for (var xe = 0; xe < b.length; xe += 1)
              (0, e.etI)(b[xe]);
            for (var rt = 0; rt < k.length; rt += 1)
              (0, e.etI)(k[rt]);
            for (var he = 0; he < M.length; he += 1)
              (0, e.etI)(M[he]);
            (0, e.etI)(Me), v = !1;
          }, d: function(_e) {
            _e && (0, e.ogt)(c);
            for (var xe = 0; xe < b.length; xe += 1)
              b[xe].d();
            pe && pe.d();
            for (var rt = 0; rt < k.length; rt += 1)
              k[rt].d();
            for (var he = 0; he < M.length; he += 1)
              M[he].d();
            Ke && Ke.d(), Me && Me.d();
          } };
        }
        function Mt(d) {
          var c, o;
          return c = new hn({ props: { origData: d[16](d[19]), dataKey: d[19], keyPath: d[3] + "." + d[19], toggle: d[0] } }), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            128 & u && (h.origData = s[16](s[19])), 128 & u && (h.dataKey = s[19]), 136 & u && (h.keyPath = s[3] + "." + s[19]), 1 & u && (h.toggle = s[0]), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function Wt(d, c) {
          var o, s, u, h = c[21] < c[11] && Mt(c);
          return { key: d, first: null, c: function() {
            o = (0, e.cSb)(), h && h.c(), s = (0, e.cSb)(), this.first = o;
          }, m: function(p, v) {
            (0, e.$Tr)(p, o, v), h && h.m(p, v), (0, e.$Tr)(p, s, v), u = !0;
          }, p: function(p, v) {
            (c = p)[21] < c[11] ? h ? (h.p(c, v), 2176 & v && (0, e.Ui)(h, 1)) : ((h = Mt(c)).c(), (0, e.Ui)(h, 1), h.m(s.parentNode, s)) : h && ((0, e.dvw)(), (0, e.etI)(h, 1, 1, function() {
              h = null;
            }), (0, e.gbL)());
          }, i: function(p) {
            u || ((0, e.Ui)(h), u = !0);
          }, o: function(p) {
            (0, e.etI)(h), u = !1;
          }, d: function(p) {
            p && (0, e.ogt)(o), h && h.d(p), p && (0, e.ogt)(s);
          } };
        }
        function ln(d) {
          var c, o, s, u, h = d[14](d[7].length - d[11]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.fLW)(h), (0, e.Ljt)(c, "class", "vc-log-tree-loadmore");
          }, m: function(p, v) {
            (0, e.$Tr)(p, c, v), (0, e.R3I)(c, o), s || (u = (0, e.oLt)(c, "click", d[17]), s = !0);
          }, p: function(p, v) {
            2176 & v && h !== (h = p[14](p[7].length - p[11]) + "") && (0, e.rTO)(o, h);
          }, d: function(p) {
            p && (0, e.ogt)(c), s = !1, u();
          } };
        }
        function xn(d, c) {
          var o, s, u;
          return s = new hn({ props: { origData: c[16](c[19]), dataKey: String(c[19]), keyType: "symbol", keyPath: c[3] + "[" + String(c[19]) + "]", toggle: c[0] } }), { key: d, first: null, c: function() {
            o = (0, e.cSb)(), (0, e.YCL)(s.$$.fragment), this.first = o;
          }, m: function(h, p) {
            (0, e.$Tr)(h, o, p), (0, e.yef)(s, h, p), u = !0;
          }, p: function(h, p) {
            c = h;
            var v = {};
            512 & p && (v.origData = c[16](c[19])), 512 & p && (v.dataKey = String(c[19])), 520 & p && (v.keyPath = c[3] + "[" + String(c[19]) + "]"), 1 & p && (v.toggle = c[0]), s.$set(v);
          }, i: function(h) {
            u || ((0, e.Ui)(s.$$.fragment, h), u = !0);
          }, o: function(h) {
            (0, e.etI)(s.$$.fragment, h), u = !1;
          }, d: function(h) {
            h && (0, e.ogt)(o), (0, e.vpE)(s, h);
          } };
        }
        function Rn(d) {
          var c, o;
          return c = new hn({ props: { origData: d[16](d[19]), dataKey: d[19], keyType: "private", keyPath: d[3] + "." + d[19], toggle: d[0] } }), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            256 & u && (h.origData = s[16](s[19])), 256 & u && (h.dataKey = s[19]), 264 & u && (h.keyPath = s[3] + "." + s[19]), 1 & u && (h.toggle = s[0]), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function Cn(d, c) {
          var o, s, u, h = c[21] < c[12] && Rn(c);
          return { key: d, first: null, c: function() {
            o = (0, e.cSb)(), h && h.c(), s = (0, e.cSb)(), this.first = o;
          }, m: function(p, v) {
            (0, e.$Tr)(p, o, v), h && h.m(p, v), (0, e.$Tr)(p, s, v), u = !0;
          }, p: function(p, v) {
            (c = p)[21] < c[12] ? h ? (h.p(c, v), 4352 & v && (0, e.Ui)(h, 1)) : ((h = Rn(c)).c(), (0, e.Ui)(h, 1), h.m(s.parentNode, s)) : h && ((0, e.dvw)(), (0, e.etI)(h, 1, 1, function() {
              h = null;
            }), (0, e.gbL)());
          }, i: function(p) {
            u || ((0, e.Ui)(h), u = !0);
          }, o: function(p) {
            (0, e.etI)(h), u = !1;
          }, d: function(p) {
            p && (0, e.ogt)(o), h && h.d(p), p && (0, e.ogt)(s);
          } };
        }
        function An(d) {
          var c, o, s, u, h = d[14](d[8].length - d[12]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.fLW)(h), (0, e.Ljt)(c, "class", "vc-log-tree-loadmore");
          }, m: function(p, v) {
            (0, e.$Tr)(p, c, v), (0, e.R3I)(c, o), s || (u = (0, e.oLt)(c, "click", d[18]), s = !0);
          }, p: function(p, v) {
            4352 & v && h !== (h = p[14](p[8].length - p[12]) + "") && (0, e.rTO)(o, h);
          }, d: function(p) {
            p && (0, e.ogt)(c), s = !1, u();
          } };
        }
        function cn(d) {
          var c, o;
          return c = new hn({ props: { origData: d[16]("__proto__"), dataKey: "__proto__", keyType: "private", keyPath: d[3] + ".__proto__", toggle: d[0] } }), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            8 & u && (h.keyPath = s[3] + ".__proto__"), 1 & u && (h.toggle = s[0]), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function kn(d) {
          var c, o, s, u, h, p, v;
          s = new Y({ props: { origData: d[1], dataKey: d[2], keyType: d[4] } });
          var b = d[6] && d[5] && Ft(d);
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), (0, e.YCL)(s.$$.fragment), u = (0, e.DhX)(), b && b.c(), (0, e.Ljt)(o, "class", "vc-log-tree-node"), (0, e.Ljt)(c, "class", "vc-log-tree"), (0, e.Ljt)(c, "data-keypath", d[3]), (0, e.VHj)(c, "vc-toggle", d[5]), (0, e.VHj)(c, "vc-is-tree", d[6]);
          }, m: function(T, k) {
            (0, e.$Tr)(T, c, k), (0, e.R3I)(c, o), (0, e.yef)(s, o, null), (0, e.R3I)(c, u), b && b.m(c, null), h = !0, p || (v = (0, e.oLt)(o, "click", (0, e.XET)(d[15])), p = !0);
          }, p: function(T, k) {
            var B = k[0], M = {};
            2 & B && (M.origData = T[1]), 4 & B && (M.dataKey = T[2]), 16 & B && (M.keyType = T[4]), s.$set(M), T[6] && T[5] ? b ? (b.p(T, B), 96 & B && (0, e.Ui)(b, 1)) : ((b = Ft(T)).c(), (0, e.Ui)(b, 1), b.m(c, null)) : b && ((0, e.dvw)(), (0, e.etI)(b, 1, 1, function() {
              b = null;
            }), (0, e.gbL)()), (!h || 8 & B) && (0, e.Ljt)(c, "data-keypath", T[3]), 32 & B && (0, e.VHj)(c, "vc-toggle", T[5]), 64 & B && (0, e.VHj)(c, "vc-is-tree", T[6]);
          }, i: function(T) {
            h || ((0, e.Ui)(s.$$.fragment, T), (0, e.Ui)(b), h = !0);
          }, o: function(T) {
            (0, e.etI)(s.$$.fragment, T), (0, e.etI)(b), h = !1;
          }, d: function(T) {
            T && (0, e.ogt)(c), (0, e.vpE)(s), b && b.d(), p = !1, v();
          } };
        }
        function Kn(d, c, o) {
          var s, u, h, p = c.origData, v = c.dataKey, b = v === void 0 ? void 0 : v, T = c.keyPath, k = T === void 0 ? "" : T, B = c.keyType, M = B === void 0 ? "" : B, W = c.toggle, N = W === void 0 ? {} : W, z = !1, Z = !1, oe = !1, ue = 50, pe = 50;
          (0, g.H3)(function() {
            Ct.use();
          }), (0, g.ev)(function() {
            Ct.unuse();
          });
          var Ie = function(Le) {
            Le === "enum" ? o(11, ue += 50) : Le === "nonEnum" && o(12, pe += 50);
          };
          return d.$$set = function(Le) {
            "origData" in Le && o(1, p = Le.origData), "dataKey" in Le && o(2, b = Le.dataKey), "keyPath" in Le && o(3, k = Le.keyPath), "keyType" in Le && o(4, M = Le.keyType), "toggle" in Le && o(0, N = Le.toggle);
          }, d.$$.update = function() {
            1003 & d.$$.dirty && (o(5, z = N[k] || !1), o(6, Z = !(p instanceof $t.Tg) && (t.kJ(p) || t.Kn(p))), Z && z && (o(7, s = s || t.qr(t.MH(p))), o(8, u = u || t.qr(t.QK(p))), o(9, h = h || t._D(p)), o(10, oe = t.Kn(p) && u.indexOf("__proto__") === -1)));
          }, [N, p, b, k, M, z, Z, s, u, h, oe, ue, pe, Ie, function(Le) {
            return "(..." + Le + " Key" + (Le > 1 ? "s" : "") + " Left)";
          }, function() {
            o(5, z = !z), o(0, N[k] = z, N);
          }, function(Le) {
            try {
              return p[Le];
            } catch {
              return new $t.Tg();
            }
          }, function() {
            return Ie("enum");
          }, function() {
            return Ie("nonEnum");
          }];
        }
        var hn = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, Kn, kn, e.AqN, { origData: 1, dataKey: 2, keyPath: 3, keyType: 4, toggle: 0 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "origData", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ origData: o }), (0, e.yl1)();
          } }, { key: "dataKey", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ dataKey: o }), (0, e.yl1)();
          } }, { key: "keyPath", get: function() {
            return this.$$.ctx[3];
          }, set: function(o) {
            this.$$set({ keyPath: o }), (0, e.yl1)();
          } }, { key: "keyType", get: function() {
            return this.$$.ctx[4];
          }, set: function(o) {
            this.$$set({ keyType: o }), (0, e.yl1)();
          } }, { key: "toggle", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ toggle: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), Fn = hn, nn = __webpack_require__(7147), un = {};
        nn.Z && nn.Z.locals && (un.locals = nn.Z.locals);
        var mn, pn = 0, rn = {};
        rn.styleTagTransform = O(), rn.setAttributes = I(), rn.insert = L().bind(null, "head"), rn.domAPI = E(), rn.insertStyleElement = w(), un.use = function(d) {
          return rn.options = d || {}, pn++ || (mn = y()(nn.Z, rn)), un;
        }, un.unuse = function() {
          pn > 0 && !--pn && (mn(), mn = null);
        };
        var gn = un;
        function Oi(d, c, o) {
          var s = d.slice();
          return s[9] = c[o], s[11] = o, s;
        }
        function Pi(d, c, o) {
          var s = d.slice();
          return s[12] = c[o], s;
        }
        function Mi(d) {
          for (var c, o, s, u, h, p, v, b, T, k, B, M, W, N = [], z = /* @__PURE__ */ new Map(), Z = d[0].groupLevel && $i(d), oe = d[2] > 0 && Fi(), ue = d[1] && Ui(d), pe = d[0].repeated && Ni(d), Ie = d[0].data, Le = function(Re) {
            return Re[11];
          }, ze = 0; ze < Ie.length; ze += 1) {
            var qe = Oi(d, Ie, ze), Je = Le(qe);
            z.set(Je, N[ze] = ji(Je, qe));
          }
          return T = new xt({ props: { handler: d[6] } }), { c: function() {
            c = (0, e.bGB)("div"), Z && Z.c(), o = (0, e.DhX)(), oe && oe.c(), s = (0, e.DhX)(), ue && ue.c(), u = (0, e.DhX)(), pe && pe.c(), h = (0, e.DhX)(), p = (0, e.bGB)("div");
            for (var Re = 0; Re < N.length; Re += 1)
              N[Re].c();
            v = (0, e.DhX)(), b = (0, e.bGB)("div"), (0, e.YCL)(T.$$.fragment), (0, e.Ljt)(p, "class", "vc-log-content"), (0, e.Ljt)(b, "class", "vc-logrow-icon"), (0, e.Ljt)(c, "class", k = "vc-log-row vc-log-" + d[0].type), (0, e.VHj)(c, "vc-log-input", d[0].cmdType === "input"), (0, e.VHj)(c, "vc-log-output", d[0].cmdType === "output"), (0, e.VHj)(c, "vc-log-group", d[2] > 0), (0, e.VHj)(c, "vc-toggle", d[2] === 1);
          }, m: function(Re, Ce) {
            (0, e.$Tr)(Re, c, Ce), Z && Z.m(c, null), (0, e.R3I)(c, o), oe && oe.m(c, null), (0, e.R3I)(c, s), ue && ue.m(c, null), (0, e.R3I)(c, u), pe && pe.m(c, null), (0, e.R3I)(c, h), (0, e.R3I)(c, p);
            for (var Qe = 0; Qe < N.length; Qe += 1)
              N[Qe].m(p, null);
            (0, e.R3I)(c, v), (0, e.R3I)(c, b), (0, e.yef)(T, b, null), B = !0, M || (W = (0, e.oLt)(c, "click", d[5]), M = !0);
          }, p: function(Re, Ce) {
            Re[0].groupLevel ? Z ? Z.p(Re, Ce) : ((Z = $i(Re)).c(), Z.m(c, o)) : Z && (Z.d(1), Z = null), Re[2] > 0 ? oe || ((oe = Fi()).c(), oe.m(c, s)) : oe && (oe.d(1), oe = null), Re[1] ? ue ? ue.p(Re, Ce) : ((ue = Ui(Re)).c(), ue.m(c, u)) : ue && (ue.d(1), ue = null), Re[0].repeated ? pe ? pe.p(Re, Ce) : ((pe = Ni(Re)).c(), pe.m(c, h)) : pe && (pe.d(1), pe = null), 17 & Ce && (Ie = Re[0].data, (0, e.dvw)(), N = (0, e.GQg)(N, Ce, Le, 1, Re, Ie, z, p, e.cly, ji, null, Oi), (0, e.gbL)()), (!B || 1 & Ce && k !== (k = "vc-log-row vc-log-" + Re[0].type)) && (0, e.Ljt)(c, "class", k), 1 & Ce && (0, e.VHj)(c, "vc-log-input", Re[0].cmdType === "input"), 1 & Ce && (0, e.VHj)(c, "vc-log-output", Re[0].cmdType === "output"), 5 & Ce && (0, e.VHj)(c, "vc-log-group", Re[2] > 0), 5 & Ce && (0, e.VHj)(c, "vc-toggle", Re[2] === 1);
          }, i: function(Re) {
            if (!B) {
              for (var Ce = 0; Ce < Ie.length; Ce += 1)
                (0, e.Ui)(N[Ce]);
              (0, e.Ui)(T.$$.fragment, Re), B = !0;
            }
          }, o: function(Re) {
            for (var Ce = 0; Ce < N.length; Ce += 1)
              (0, e.etI)(N[Ce]);
            (0, e.etI)(T.$$.fragment, Re), B = !1;
          }, d: function(Re) {
            Re && (0, e.ogt)(c), Z && Z.d(), oe && oe.d(), ue && ue.d(), pe && pe.d();
            for (var Ce = 0; Ce < N.length; Ce += 1)
              N[Ce].d();
            (0, e.vpE)(T), M = !1, W();
          } };
        }
        function $i(d) {
          for (var c, o = new Array(d[0].groupLevel), s = [], u = 0; u < o.length; u += 1)
            s[u] = Bi(Pi(d, o, u));
          return { c: function() {
            for (var h = 0; h < s.length; h += 1)
              s[h].c();
            c = (0, e.cSb)();
          }, m: function(h, p) {
            for (var v = 0; v < s.length; v += 1)
              s[v].m(h, p);
            (0, e.$Tr)(h, c, p);
          }, p: function(h, p) {
            if (1 & p) {
              var v;
              for (o = new Array(h[0].groupLevel), v = 0; v < o.length; v += 1) {
                var b = Pi(h, o, v);
                s[v] ? s[v].p(b, p) : (s[v] = Bi(), s[v].c(), s[v].m(c.parentNode, c));
              }
              for (; v < s.length; v += 1)
                s[v].d(1);
              s.length = o.length;
            }
          }, d: function(h) {
            (0, e.RMB)(s, h), h && (0, e.ogt)(c);
          } };
        }
        function Bi(d) {
          var c;
          return { c: function() {
            c = (0, e.bGB)("i"), (0, e.Ljt)(c, "class", "vc-log-padding");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, p: e.ZTd, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function Fi(d) {
          var c;
          return { c: function() {
            c = (0, e.bGB)("div"), (0, e.Ljt)(c, "class", "vc-log-group-toggle");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function Ui(d) {
          var c, o;
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.fLW)(d[3]), (0, e.Ljt)(c, "class", "vc-log-time");
          }, m: function(s, u) {
            (0, e.$Tr)(s, c, u), (0, e.R3I)(c, o);
          }, p: function(s, u) {
            8 & u && (0, e.rTO)(o, s[3]);
          }, d: function(s) {
            s && (0, e.ogt)(c);
          } };
        }
        function Ni(d) {
          var c, o, s, u = d[0].repeated + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("i"), s = (0, e.fLW)(u), (0, e.Ljt)(c, "class", "vc-log-repeat");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o), (0, e.R3I)(o, s);
          }, p: function(h, p) {
            1 & p && u !== (u = h[0].repeated + "") && (0, e.rTO)(s, u);
          }, d: function(h) {
            h && (0, e.ogt)(c);
          } };
        }
        function oo(d) {
          var c, o;
          return c = new Y({ props: { origData: d[9].origData, style: d[9].style } }), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            1 & u && (h.origData = s[9].origData), 1 & u && (h.style = s[9].style), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function so(d) {
          var c, o;
          return c = new Fn({ props: { origData: d[9].origData, keyPath: String(d[11]), toggle: d[0].toggle } }), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            1 & u && (h.origData = s[9].origData), 1 & u && (h.keyPath = String(s[11])), 1 & u && (h.toggle = s[0].toggle), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function ji(d, c) {
          var o, s, u, h, p, v, b = [so, oo], T = [];
          function k(B, M) {
            return 1 & M && (s = null), s == null && (s = !!B[4](B[9].origData)), s ? 0 : 1;
          }
          return u = k(c, -1), h = T[u] = b[u](c), { key: d, first: null, c: function() {
            o = (0, e.cSb)(), h.c(), p = (0, e.cSb)(), this.first = o;
          }, m: function(B, M) {
            (0, e.$Tr)(B, o, M), T[u].m(B, M), (0, e.$Tr)(B, p, M), v = !0;
          }, p: function(B, M) {
            var W = u;
            (u = k(c = B, M)) === W ? T[u].p(c, M) : ((0, e.dvw)(), (0, e.etI)(T[W], 1, 1, function() {
              T[W] = null;
            }), (0, e.gbL)(), (h = T[u]) ? h.p(c, M) : (h = T[u] = b[u](c)).c(), (0, e.Ui)(h, 1), h.m(p.parentNode, p));
          }, i: function(B) {
            v || ((0, e.Ui)(h), v = !0);
          }, o: function(B) {
            (0, e.etI)(h), v = !1;
          }, d: function(B) {
            B && (0, e.ogt)(o), T[u].d(B), B && (0, e.ogt)(p);
          } };
        }
        function ao(d) {
          var c, o, s = d[0] && Mi(d);
          return { c: function() {
            s && s.c(), c = (0, e.cSb)();
          }, m: function(u, h) {
            s && s.m(u, h), (0, e.$Tr)(u, c, h), o = !0;
          }, p: function(u, h) {
            var p = h[0];
            u[0] ? s ? (s.p(u, p), 1 & p && (0, e.Ui)(s, 1)) : ((s = Mi(u)).c(), (0, e.Ui)(s, 1), s.m(c.parentNode, c)) : s && ((0, e.dvw)(), (0, e.etI)(s, 1, 1, function() {
              s = null;
            }), (0, e.gbL)());
          }, i: function(u) {
            o || ((0, e.Ui)(s), o = !0);
          }, o: function(u) {
            (0, e.etI)(s), o = !1;
          }, d: function(u) {
            s && s.d(u), u && (0, e.ogt)(c);
          } };
        }
        function lo(d, c, o) {
          var s = c.log, u = c.showTimestamps, h = u !== void 0 && u, p = c.groupHeader, v = p === void 0 ? 0 : p, b = (0, g.x)(), T = "", k = function(B, M) {
            var W = "000" + B;
            return W.substring(W.length - M);
          };
          return (0, g.H3)(function() {
            gn.use();
          }), (0, g.ev)(function() {
            gn.unuse();
          }), d.$$set = function(B) {
            "log" in B && o(0, s = B.log), "showTimestamps" in B && o(1, h = B.showTimestamps), "groupHeader" in B && o(2, v = B.groupHeader);
          }, d.$$.update = function() {
            if (3 & d.$$.dirty && h) {
              var B = new Date(s.date);
              o(3, T = k(B.getHours(), 2) + ":" + k(B.getMinutes(), 2) + ":" + k(B.getSeconds(), 2) + ":" + k(B.getMilliseconds(), 3));
            }
          }, [s, h, v, T, function(B) {
            return !(B instanceof $t.Tg) && (t.kJ(B) || t.Kn(B));
          }, function() {
            v > 0 && b("groupCollapsed", { groupLabel: s.groupLabel, groupHeader: v === 1 ? 2 : 1, isGroupCollapsed: v === 1 });
          }, function() {
            var B = [];
            try {
              for (var M = 0; M < s.data.length; M++)
                t.HD(s.data[M].origData) || t.hj(s.data[M].origData) ? B.push(s.data[M].origData) : B.push(t.hZ(s.data[M].origData, { maxDepth: 10, keyMaxLen: 1e4, pretty: !1, standardJSON: !0 }));
            } catch {
            }
            return B.join(" ");
          }];
        }
        var co = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, lo, ao, e.AqN, { log: 0, showTimestamps: 1, groupHeader: 2 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "log", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ log: o }), (0, e.yl1)();
          } }, { key: "showTimestamps", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ showTimestamps: o }), (0, e.yl1)();
          } }, { key: "groupHeader", get: function() {
            return this.$$.ctx[2];
          }, set: function(o) {
            this.$$set({ groupHeader: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), uo = co, fo = __webpack_require__(3903), Xn = __webpack_require__(3327), Un = {};
        Xn.Z && Xn.Z.locals && (Un.locals = Xn.Z.locals);
        var hi, mi = 0, En = {};
        En.styleTagTransform = O(), En.setAttributes = I(), En.insert = L().bind(null, "head"), En.domAPI = E(), En.insertStyleElement = w(), Un.use = function(d) {
          return En.options = d || {}, mi++ || (hi = y()(Xn.Z, En)), Un;
        }, Un.unuse = function() {
          mi > 0 && !--mi && (hi(), hi = null);
        };
        var Vi = Un, ho = __webpack_require__(4264), at = __webpack_require__.n(ho), mo = function() {
          function d(o) {
            console.debug("[vConsole] `ResizeObserver` is not supported in the browser, vConsole cannot render correctly."), o([{ contentRect: { height: 30 } }], this);
          }
          var c = d.prototype;
          return c.disconnect = function() {
          }, c.observe = function(o, s) {
          }, c.unobserve = function(o) {
          }, d;
        }(), pi = function() {
          return typeof window.ResizeObserver == "function";
        }, Gi = function() {
          return window.ResizeObserver || mo;
        };
        function po(d) {
          var c, o, s = d[6].default, u = (0, e.nuO)(s, d, d[5], null);
          return { c: function() {
            c = (0, e.bGB)("div"), u && u.c(), (0, e.Ljt)(c, "class", "vc-scroller-item"), (0, e.czc)(c, "display", d[0] ? "block" : "none", !1), (0, e.czc)(c, "top", d[3] ? d[1] + "px" : "auto", !1);
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), u && u.m(c, null), d[7](c), o = !0;
          }, p: function(h, p) {
            var v = p[0];
            u && u.p && (!o || 32 & v) && (0, e.kmG)(u, s, h, h[5], o ? (0, e.u2N)(s, h[5], v, null) : (0, e.VOJ)(h[5]), null), 1 & v && (0, e.czc)(c, "display", h[0] ? "block" : "none", !1), 2 & v && (0, e.czc)(c, "top", h[3] ? h[1] + "px" : "auto", !1);
          }, i: function(h) {
            o || ((0, e.Ui)(u, h), o = !0);
          }, o: function(h) {
            (0, e.etI)(u, h), o = !1;
          }, d: function(h) {
            h && (0, e.ogt)(c), u && u.d(h), d[7](null);
          } };
        }
        function go(d, c, o) {
          var s, u = c.$$slots, h = u === void 0 ? {} : u, p = c.$$scope, v = c.show, b = v === void 0 ? !pi() : v, T = c.top, k = c.onResize, B = k === void 0 ? function() {
          } : k, M = null, W = pi();
          return (0, g.H3)(function() {
            if (b && B(s.getBoundingClientRect().height), W) {
              var N = Gi();
              (M = new N(function(z) {
                var Z = z[0];
                b && B(Z.contentRect.height);
              })).observe(s);
            }
          }), (0, g.ev)(function() {
            W && M.disconnect();
          }), d.$$set = function(N) {
            "show" in N && o(0, b = N.show), "top" in N && o(1, T = N.top), "onResize" in N && o(4, B = N.onResize), "$$scope" in N && o(5, p = N.$$scope);
          }, [b, T, s, W, B, p, h, function(N) {
            e.VnY[N ? "unshift" : "push"](function() {
              o(2, s = N);
            });
          }];
        }
        var vo = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, go, po, e.N8, { show: 0, top: 1, onResize: 4 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "show", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ show: o }), (0, e.yl1)();
          } }, { key: "top", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ top: o }), (0, e.yl1)();
          } }, { key: "onResize", get: function() {
            return this.$$.ctx[4];
          }, set: function(o) {
            this.$$set({ onResize: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), _o = vo, yo = function() {
          function d() {
            this._x = 0, this._endX = 0, this._v = 0, this._startTime = 0, this._endTime = 0;
          }
          var c = d.prototype;
          return c.set = function(o, s, u, h) {
            this._x = o, this._endX = s, this._v = (s - o) / u, this._startTime = h || Date.now(), this._endTime = this._startTime + u;
          }, c.x = function(o) {
            if (this.done(o))
              return this._endX;
            var s = o - this._startTime;
            return this._x + this._v * s;
          }, c.dx = function(o) {
            return this.done(o) ? 0 : this._v;
          }, c.done = function(o) {
            return o >= this._endTime;
          }, d;
        }(), bo = function() {
          function d(o) {
            this._drag = void 0, this._dragLog = void 0, this._x = 0, this._v = 0, this._startTime = 0, this._drag = o, this._dragLog = Math.log(o);
          }
          var c = d.prototype;
          return c.set = function(o, s, u) {
            this._x = o, this._v = s, this._startTime = u || Date.now();
          }, c.x = function(o) {
            var s = (o - this._startTime) / 1e3;
            return this._x + this._v * Math.pow(this._drag, s) / this._dragLog - this._v / this._dragLog;
          }, c.dx = function(o) {
            var s = (o - this._startTime) / 1e3;
            return this._v * Math.pow(this._drag, s);
          }, c.done = function(o) {
            return Math.abs(this.dx(o)) < 3;
          }, d;
        }(), Wi = function(d, c) {
          return d > c - 0.1 && d < c + 0.1;
        }, Hi = function(d) {
          return Wi(d, 0);
        }, xo = function() {
          function d(o, s, u) {
            this._solver = void 0, this._solution = void 0, this._endPosition = void 0, this._startTime = void 0, this._solver = function(h, p, v) {
              var b = v, T = h, k = p, B = b * b - 4 * T * k;
              if (B == 0) {
                var M = -b / (2 * T);
                return function(oe, ue) {
                  var pe = oe, Ie = ue / (M * oe);
                  return { x: function(Le) {
                    return (pe + Ie * Le) * Math.pow(Math.E, M * Le);
                  }, dx: function(Le) {
                    return (M * (pe + Ie * Le) + Ie) * Math.pow(Math.E, M * Le);
                  } };
                };
              }
              if (B > 0) {
                var W = (-b - Math.sqrt(B)) / (2 * T), N = (-b + Math.sqrt(B)) / (2 * T);
                return function(oe, ue) {
                  var pe = (ue - W * oe) / (N - W), Ie = oe - pe;
                  return { x: function(Le) {
                    return Ie * Math.pow(Math.E, W * Le) + pe * Math.pow(Math.E, N * Le);
                  }, dx: function(Le) {
                    return Ie * W * Math.pow(Math.E, W * Le) + pe * N * Math.pow(Math.E, N * Le);
                  } };
                };
              }
              var z = Math.sqrt(4 * T * k - b * b) / (2 * T), Z = -b / 2 * T;
              return function(oe, ue) {
                var pe = oe, Ie = (ue - Z * oe) / z;
                return { x: function(Le) {
                  return Math.pow(Math.E, Z * Le) * (pe * Math.cos(z * Le) + Ie * Math.sin(z * Le));
                }, dx: function(Le) {
                  var ze = Math.pow(Math.E, Z * Le), qe = Math.cos(z * Le), Je = Math.sin(z * Le);
                  return ze * (Ie * z * qe - pe * z * Je) + Z * ze * (Ie * Je + pe * qe);
                } };
              };
            }(o, s, u), this._solution = null, this._endPosition = 0, this._startTime = 0;
          }
          var c = d.prototype;
          return c.x = function(o) {
            if (!this._solution)
              return 0;
            var s = (o - this._startTime) / 1e3;
            return this._endPosition + this._solution.x(s);
          }, c.dx = function(o) {
            if (!this._solution)
              return 0;
            var s = (o - this._startTime) / 1e3;
            return this._solution.dx(s);
          }, c.set = function(o, s, u, h) {
            h || (h = Date.now()), this._endPosition = o, s == o && Hi(u) || (this._solution = this._solver(s - o, u), this._startTime = h);
          }, c.done = function(o) {
            return o || (o = Date.now()), Wi(this.x(o), this._endPosition) && Hi(this.dx(o));
          }, d;
        }(), Eo = function() {
          function d(o, s) {
            this._enableSpring = s, this._getExtend = void 0, this._friction = new bo(0.05), this._spring = new xo(1, 90, 20), this._toEdge = !1, this._getExtend = o;
          }
          var c = d.prototype;
          return c.set = function(o, s, u) {
            if (u === void 0 && (u = Date.now()), this._friction.set(o, s, u), o > 0 && s >= 0)
              this._toEdge = !0, this._enableSpring && this._spring.set(0, o, s, u);
            else {
              var h = this._getExtend();
              o < -h && s <= 0 ? (this._toEdge = !0, this._enableSpring && this._spring.set(-h, o, s, u)) : this._toEdge = !1;
            }
          }, c.x = function(o) {
            if (this._enableSpring && this._toEdge)
              return this._spring.x(o);
            var s = this._friction.x(o), u = this._friction.dx(o);
            if (s > 0 && u >= 0) {
              if (this._toEdge = !0, !this._enableSpring)
                return 0;
              this._spring.set(0, s, u, o);
            } else {
              var h = this._getExtend();
              if (s < -h && u <= 0) {
                if (this._toEdge = !0, !this._enableSpring)
                  return -h;
                this._spring.set(-h, s, u, o);
              }
            }
            return s;
          }, c.dx = function(o) {
            return this._toEdge ? this._enableSpring ? this._spring.dx(o) : 0 : this._friction.dx(o);
          }, c.done = function(o) {
            return this._toEdge ? !this._enableSpring || this._spring.done(o) : this._friction.done(o);
          }, d;
        }();
        function gi(d, c) {
          var o, s;
          return function u() {
            if (!s) {
              var h = Date.now();
              c(h), d.done(h) || (o = requestAnimationFrame(u));
            }
          }(), { cancel: function() {
            cancelAnimationFrame(o), s = !0;
          } };
        }
        var wo = function() {
          function d(o, s) {
            this._updatePosition = s, this._scrollModel = void 0, this._linearModel = void 0, this._startPosition = 0, this._position = 0, this._animate = null, this._getExtent = void 0, this._getExtent = o, this._scrollModel = new Eo(o, !1), this._linearModel = new yo();
          }
          var c = d.prototype;
          return c.onTouchStart = function() {
            var o = this._position;
            if (o > 0)
              o *= 0;
            else {
              var s = this._getExtent();
              o < -s && (o = 0 * (o + s) - s);
            }
            this._startPosition = this._position = o, this._animate && (this._animate.cancel(), this._animate = null), this._updatePosition(-o);
          }, c.onTouchMove = function(o, s) {
            var u = s + this._startPosition;
            if (u > 0)
              u *= 0;
            else {
              var h = this._getExtent();
              u < -h && (u = 0 * (u + h) - h);
            }
            this._position = u, this._updatePosition(-u);
          }, c.onTouchEnd = function(o, s, u, h) {
            var p = this, v = s + this._startPosition;
            if (v > 0)
              v *= 0;
            else {
              var b = this._getExtent();
              v < -b && (v = 0 * (v + b) - b);
            }
            if (this._position = v, this._updatePosition(-v), !(Math.abs(s) <= 0.1 && Math.abs(h) <= 0.1)) {
              var T = this._scrollModel;
              T.set(v, h), this._animate = gi(T, function(k) {
                var B = p._position = T.x(k);
                p._updatePosition(-B);
              });
            }
          }, c.onTouchCancel = function() {
            var o = this, s = this._position;
            if (s > 0)
              s *= 0;
            else {
              var u = this._getExtent();
              s < -u && (s = 0 * (s + u) - u);
            }
            this._position = s;
            var h = this._scrollModel;
            h.set(s, 0), this._animate = gi(h, function(p) {
              var v = o._position = h.x(p);
              o._updatePosition(-v);
            });
          }, c.onWheel = function(o, s) {
            var u = this._position - s;
            if (this._animate && (this._animate.cancel(), this._animate = null), u > 0)
              u = 0;
            else {
              var h = this._getExtent();
              u < -h && (u = -h);
            }
            this._position = u, this._updatePosition(-u);
          }, c.getPosition = function() {
            return -this._position;
          }, c.updatePosition = function(o) {
            var s = -o - this._position;
            this._startPosition += s, this._position += s;
            var u = this._position;
            this._updatePosition(-u);
            var h = this._scrollModel, p = Date.now();
            if (!h.done(p)) {
              var v = h.dx(p);
              h.set(u, v, p);
            }
          }, c.scrollTo = function(o, s) {
            var u = this;
            if (this._animate && (this._animate.cancel(), this._animate = null), s > 0) {
              var h = this._linearModel;
              h.set(this._position, -o, s), this._animate = gi(this._linearModel, function(p) {
                var v = u._position = h.x(p);
                u._updatePosition(-v);
              });
            } else
              this._updatePosition(o);
          }, d;
        }();
        function To(d, c) {
          var o = typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
          if (o)
            return (o = o.call(d)).next.bind(o);
          if (Array.isArray(d) || (o = function(u, h) {
            if (u) {
              if (typeof u == "string")
                return zi(u, h);
              var p = Object.prototype.toString.call(u).slice(8, -1);
              if (p === "Object" && u.constructor && (p = u.constructor.name), p === "Map" || p === "Set")
                return Array.from(u);
              if (p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))
                return zi(u, h);
            }
          }(d)) || c && d && typeof d.length == "number") {
            o && (d = o);
            var s = 0;
            return function() {
              return s >= d.length ? { done: !0 } : { done: !1, value: d[s++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function zi(d, c) {
          (c == null || c > d.length) && (c = d.length);
          for (var o = 0, s = new Array(c); o < c; o++)
            s[o] = d[o];
          return s;
        }
        var Lo = function(d) {
          var c = null, o = !1, s = function u() {
            o = !1, d(), c = requestAnimationFrame(function() {
              c = null, o && u();
            });
          };
          return { trigger: function() {
            c === null ? s() : o = !0;
          }, cancel: function() {
            c && (cancelAnimationFrame(c), o = !1, c = null);
          } };
        }, So = function() {
          function d(c) {
            var o = this;
            this._handler = c, this._touchId = null, this._startX = 0, this._startY = 0, this._historyX = [], this._historyY = [], this._historyTime = [], this._wheelDeltaX = 0, this._wheelDeltaY = 0, this._onTouchMove = function() {
              var s = o._historyX[o._historyX.length - 1], u = o._historyY[o._historyY.length - 1];
              o._handler.onTouchMove(s, u);
            }, this._onWheel = Lo(function() {
              var s = o._wheelDeltaX, u = o._wheelDeltaY;
              o._wheelDeltaX = 0, o._wheelDeltaY = 0, o._handler.onWheel(s, u);
            }), this.handleTouchStart = function(s) {
              var u;
              if (((u = s.target.dataset) == null ? void 0 : u.scrollable) !== "1") {
                s.preventDefault();
                var h = s.touches[0];
                o._touchId = h.identifier, o._startX = h.pageX, o._startY = h.pageY, o._historyX = [0], o._historyY = [0], o._historyTime = [Date.now()], o._handler.onTouchStart();
              }
            }, this.handleTouchMove = function(s) {
              var u;
              if (((u = s.target.dataset) == null ? void 0 : u.scrollable) !== "1") {
                s.preventDefault();
                var h = o._getTouchDelta(s);
                h !== null && (o._historyX.push(h.x), o._historyY.push(h.y), o._historyTime.push(Date.now()), o._onTouchMove());
              }
            }, this.handleTouchEnd = function(s) {
              var u;
              if (((u = s.target.dataset) == null ? void 0 : u.scrollable) !== "1") {
                s.preventDefault();
                var h = o._getTouchDelta(s);
                if (h !== null) {
                  for (var p = 0, v = 0, b = Date.now(), T = h.y, k = h.x, B = o._historyTime, M = B.length - 1; M > 0; M -= 1) {
                    var W = b - B[M];
                    if (W > 30) {
                      p = 1e3 * (k - o._historyX[M]) / W, v = 1e3 * (T - o._historyY[M]) / W;
                      break;
                    }
                  }
                  o._touchId = null, o._handler.onTouchEnd(h.x, h.y, p, v);
                }
              }
            }, this.handleTouchCancel = function(s) {
              var u;
              ((u = s.target.dataset) == null ? void 0 : u.scrollable) !== "1" && (s.preventDefault(), o._getTouchDelta(s) !== null && (o._touchId = null, o._handler.onTouchCancel()));
            }, this.handleWheel = function(s) {
              var u;
              ((u = s.target.dataset) == null ? void 0 : u.scrollable) !== "1" && (s.preventDefault(), o._wheelDeltaX += s.deltaX, o._wheelDeltaY += s.deltaY, o._onWheel.trigger());
            };
          }
          return d.prototype._getTouchDelta = function(c) {
            if (this._touchId === null)
              return null;
            for (var o, s = To(c.changedTouches); !(o = s()).done; ) {
              var u = o.value;
              if (u.identifier === this._touchId)
                return { x: u.pageX - this._startX, y: u.pageY - this._startY };
            }
            return null;
          }, d;
        }(), Yn = __webpack_require__(1142), Nn = {};
        Yn.Z && Yn.Z.locals && (Nn.locals = Yn.Z.locals);
        var vi, _i = 0, wn = {};
        wn.styleTagTransform = O(), wn.setAttributes = I(), wn.insert = L().bind(null, "head"), wn.domAPI = E(), wn.insertStyleElement = w(), Nn.use = function(d) {
          return wn.options = d || {}, _i++ || (vi = y()(Yn.Z, wn)), Nn;
        }, Nn.unuse = function() {
          _i > 0 && !--_i && (vi(), vi = null);
        };
        var qi = Nn, Ro = function() {
          var d = [], c = [], o = 0, s = 0, u = 0, h = 0, p = 0;
          return function(v, b, T) {
            if (u === v && h === b && p === T)
              return d;
            var k = c.length, B = b <= s ? Math.max(0, Math.min(b, Math.max(o, Math.min(s - 1, T - k)))) : b, M = o <= T ? Math.max(T, Math.min(v, Math.max(o + 1, Math.min(s, B + k)))) : T;
            if (k === 0 || M - B < k) {
              for (var W = d.length = c.length = T - b, N = 0; N < W; N += 1)
                c[N] = N, d[N] = { key: N, index: N + b, show: !0 };
              return o = b, s = T, u = v, h = b, p = T, d;
            }
            var z = 0, Z = 0, oe = 0, ue = 0;
            s < B || M < o ? (oe = B, ue = B + k) : o < B ? (Z = B - o, oe = B, ue = B + k) : M < s ? (Z = k - (s - M), oe = M - k, ue = M) : B <= o && s <= M && (oe = o, ue = s);
            for (var pe = B; pe < b; pe += 1, z += 1) {
              var Ie = c[(Z + z) % k], Le = d[pe - B];
              Le.key = Ie, Le.index = pe, Le.show = !1;
            }
            for (var ze = b, qe = 0; ze < T; ze += 1) {
              var Je = void 0;
              oe <= ze && ze < ue ? (Je = c[(Z + z) % k], z += 1) : (Je = k + qe, qe += 1);
              var Re = ze - B;
              if (Re < d.length) {
                var Ce = d[Re];
                Ce.key = Je, Ce.index = ze, Ce.show = !0;
              } else
                d.push({ key: Je, index: ze, show: !0 });
            }
            for (var Qe = T; Qe < M; Qe += 1, z += 1) {
              var _t = c[(Z + z) % k], et = d[Qe - B];
              et.key = _t, et.index = Qe, et.show = !1;
            }
            for (var Ke = 0; Ke < d.length; Ke += 1)
              c[Ke] = d[Ke].key;
            return d.sort(function(Me, _e) {
              return Me.key - _e.key;
            }), o = B, s = M, u = v, h = b, p = T, d;
          };
        }, Co = e.lig.Map, Ao = function(d) {
          return {};
        }, Ki = function(d) {
          return {};
        }, ko = function(d) {
          return {};
        }, Xi = function(d) {
          return {};
        };
        function Yi(d, c, o) {
          var s = d.slice();
          return s[53] = c[o], s[55] = o, s;
        }
        var Io = function(d) {
          return { item: 1025 & d[0] };
        }, Zi = function(d) {
          return { item: d[0][d[53].index] };
        }, Do = function(d) {
          return {};
        }, Ji = function(d) {
          return {};
        };
        function Qi(d) {
          var c, o, s = d[24].header, u = (0, e.nuO)(s, d, d[31], Ji);
          return { c: function() {
            c = (0, e.bGB)("div"), u && u.c(), (0, e.Ljt)(c, "class", "vc-scroller-header");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), u && u.m(c, null), d[25](c), o = !0;
          }, p: function(h, p) {
            u && u.p && (!o || 1 & p[1]) && (0, e.kmG)(u, s, h, h[31], o ? (0, e.u2N)(s, h[31], p, Do) : (0, e.VOJ)(h[31]), Ji);
          }, i: function(h) {
            o || ((0, e.Ui)(u, h), o = !0);
          }, o: function(h) {
            (0, e.etI)(u, h), o = !1;
          }, d: function(h) {
            h && (0, e.ogt)(c), u && u.d(h), d[25](null);
          } };
        }
        function Oo(d) {
          var c, o = d[24].empty, s = (0, e.nuO)(o, d, d[31], Xi);
          return { c: function() {
            s && s.c();
          }, m: function(u, h) {
            s && s.m(u, h), c = !0;
          }, p: function(u, h) {
            s && s.p && (!c || 1 & h[1]) && (0, e.kmG)(s, o, u, u[31], c ? (0, e.u2N)(o, u[31], h, ko) : (0, e.VOJ)(u[31]), Xi);
          }, i: function(u) {
            c || ((0, e.Ui)(s, u), c = !0);
          }, o: function(u) {
            (0, e.etI)(s, u), c = !1;
          }, d: function(u) {
            s && s.d(u);
          } };
        }
        function Po(d) {
          for (var c, o, s = [], u = new Co(), h = d[10], p = function(k) {
            return k[53].key;
          }, v = 0; v < h.length; v += 1) {
            var b = Yi(d, h, v), T = p(b);
            u.set(T, s[v] = er(T, b));
          }
          return { c: function() {
            for (var k = 0; k < s.length; k += 1)
              s[k].c();
            c = (0, e.cSb)();
          }, m: function(k, B) {
            for (var M = 0; M < s.length; M += 1)
              s[M].m(k, B);
            (0, e.$Tr)(k, c, B), o = !0;
          }, p: function(k, B) {
            17921 & B[0] | 1 & B[1] && (h = k[10], (0, e.dvw)(), s = (0, e.GQg)(s, B, p, 1, k, h, u, c.parentNode, e.cly, er, c, Yi), (0, e.gbL)());
          }, i: function(k) {
            if (!o) {
              for (var B = 0; B < h.length; B += 1)
                (0, e.Ui)(s[B]);
              o = !0;
            }
          }, o: function(k) {
            for (var B = 0; B < s.length; B += 1)
              (0, e.etI)(s[B]);
            o = !1;
          }, d: function(k) {
            for (var B = 0; B < s.length; B += 1)
              s[B].d(k);
            k && (0, e.ogt)(c);
          } };
        }
        function Mo(d) {
          var c, o, s = d[24].item, u = (0, e.nuO)(s, d, d[31], Zi), h = u || function(p) {
            var v;
            return { c: function() {
              v = (0, e.fLW)("Missing template");
            }, m: function(b, T) {
              (0, e.$Tr)(b, v, T);
            }, d: function(b) {
              b && (0, e.ogt)(v);
            } };
          }();
          return { c: function() {
            h && h.c(), c = (0, e.DhX)();
          }, m: function(p, v) {
            h && h.m(p, v), (0, e.$Tr)(p, c, v), o = !0;
          }, p: function(p, v) {
            u && u.p && (!o || 1025 & v[0] | 1 & v[1]) && (0, e.kmG)(u, s, p, p[31], o ? (0, e.u2N)(s, p[31], v, Io) : (0, e.VOJ)(p[31]), Zi);
          }, i: function(p) {
            o || ((0, e.Ui)(h, p), o = !0);
          }, o: function(p) {
            (0, e.etI)(h, p), o = !1;
          }, d: function(p) {
            h && h.d(p), p && (0, e.ogt)(c);
          } };
        }
        function er(d, c) {
          var o, s, u;
          function h() {
            for (var p, v = arguments.length, b = new Array(v), T = 0; T < v; T++)
              b[T] = arguments[T];
            return (p = c)[26].apply(p, [c[53]].concat(b));
          }
          return s = new _o({ props: { show: c[53].show, top: c[9][c[53].index], onResize: h, $$slots: { default: [Mo] }, $$scope: { ctx: c } } }), { key: d, first: null, c: function() {
            o = (0, e.cSb)(), (0, e.YCL)(s.$$.fragment), this.first = o;
          }, m: function(p, v) {
            (0, e.$Tr)(p, o, v), (0, e.yef)(s, p, v), u = !0;
          }, p: function(p, v) {
            c = p;
            var b = {};
            1024 & v[0] && (b.show = c[53].show), 1536 & v[0] && (b.top = c[9][c[53].index]), 1024 & v[0] && (b.onResize = h), 1025 & v[0] | 1 & v[1] && (b.$$scope = { dirty: v, ctx: c }), s.$set(b);
          }, i: function(p) {
            u || ((0, e.Ui)(s.$$.fragment, p), u = !0);
          }, o: function(p) {
            (0, e.etI)(s.$$.fragment, p), u = !1;
          }, d: function(p) {
            p && (0, e.ogt)(o), (0, e.vpE)(s, p);
          } };
        }
        function tr(d) {
          var c, o, s = d[24].footer, u = (0, e.nuO)(s, d, d[31], Ki);
          return { c: function() {
            c = (0, e.bGB)("div"), u && u.c(), (0, e.Ljt)(c, "class", "vc-scroller-footer");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), u && u.m(c, null), d[28](c), o = !0;
          }, p: function(h, p) {
            u && u.p && (!o || 1 & p[1]) && (0, e.kmG)(u, s, h, h[31], o ? (0, e.u2N)(s, h[31], p, Ao) : (0, e.VOJ)(h[31]), Ki);
          }, i: function(h) {
            o || ((0, e.Ui)(u, h), o = !0);
          }, o: function(h) {
            (0, e.etI)(u, h), o = !1;
          }, d: function(h) {
            h && (0, e.ogt)(c), u && u.d(h), d[28](null);
          } };
        }
        function nr(d) {
          var c, o, s = d[7] + "%", u = d[8] + "%";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), (0, e.Ljt)(o, "class", "vc-scroller-scrollbar-thumb"), (0, e.czc)(o, "height", s, !1), (0, e.czc)(o, "top", u, !1), (0, e.Ljt)(c, "class", "vc-scroller-scrollbar-track"), (0, e.czc)(c, "display", d[7] < 100 ? "block" : "none", !1);
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o);
          }, p: function(h, p) {
            128 & p[0] && s !== (s = h[7] + "%") && (0, e.czc)(o, "height", s, !1), 256 & p[0] && u !== (u = h[8] + "%") && (0, e.czc)(o, "top", u, !1), 128 & p[0] && (0, e.czc)(c, "display", h[7] < 100 ? "block" : "none", !1);
          }, d: function(h) {
            h && (0, e.ogt)(c);
          } };
        }
        function $o(d) {
          var c, o, s, u, h, p, v, b, T, k, B, M = d[15].header && Qi(d), W = [Po, Oo], N = [];
          function z(ue, pe) {
            return ue[0].length ? 0 : 1;
          }
          h = z(d), p = N[h] = W[h](d);
          var Z = d[15].footer && tr(d), oe = d[1] && nr(d);
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), M && M.c(), s = (0, e.DhX)(), u = (0, e.bGB)("div"), p.c(), v = (0, e.DhX)(), Z && Z.c(), b = (0, e.DhX)(), oe && oe.c(), (0, e.Ljt)(u, "class", "vc-scroller-items"), (0, e.Ljt)(o, "class", "vc-scroller-contents"), (0, e.Ljt)(c, "class", "vc-scroller-viewport"), (0, e.VHj)(c, "static", !d[13]);
          }, m: function(ue, pe) {
            (0, e.$Tr)(ue, c, pe), (0, e.R3I)(c, o), M && M.m(o, null), (0, e.R3I)(o, s), (0, e.R3I)(o, u), N[h].m(u, null), d[27](u), (0, e.R3I)(o, v), Z && Z.m(o, null), d[29](o), (0, e.R3I)(c, b), oe && oe.m(c, null), d[30](c), T = !0, k || (B = [(0, e.oLt)(c, "touchstart", function() {
              (0, e.sBU)(d[13] ? d[11].handleTouchStart : d[12]) && (d[13] ? d[11].handleTouchStart : d[12]).apply(this, arguments);
            }), (0, e.oLt)(c, "touchmove", function() {
              (0, e.sBU)(d[13] ? d[11].handleTouchMove : d[12]) && (d[13] ? d[11].handleTouchMove : d[12]).apply(this, arguments);
            }), (0, e.oLt)(c, "touchend", function() {
              (0, e.sBU)(d[13] ? d[11].handleTouchEnd : d[12]) && (d[13] ? d[11].handleTouchEnd : d[12]).apply(this, arguments);
            }), (0, e.oLt)(c, "touchcancel", function() {
              (0, e.sBU)(d[13] ? d[11].handleTouchCancel : d[12]) && (d[13] ? d[11].handleTouchCancel : d[12]).apply(this, arguments);
            }), (0, e.oLt)(c, "wheel", function() {
              (0, e.sBU)(d[13] ? d[11].handleWheel : d[12]) && (d[13] ? d[11].handleWheel : d[12]).apply(this, arguments);
            })], k = !0);
          }, p: function(ue, pe) {
            (d = ue)[15].header ? M ? (M.p(d, pe), 32768 & pe[0] && (0, e.Ui)(M, 1)) : ((M = Qi(d)).c(), (0, e.Ui)(M, 1), M.m(o, s)) : M && ((0, e.dvw)(), (0, e.etI)(M, 1, 1, function() {
              M = null;
            }), (0, e.gbL)());
            var Ie = h;
            (h = z(d)) === Ie ? N[h].p(d, pe) : ((0, e.dvw)(), (0, e.etI)(N[Ie], 1, 1, function() {
              N[Ie] = null;
            }), (0, e.gbL)(), (p = N[h]) ? p.p(d, pe) : (p = N[h] = W[h](d)).c(), (0, e.Ui)(p, 1), p.m(u, null)), d[15].footer ? Z ? (Z.p(d, pe), 32768 & pe[0] && (0, e.Ui)(Z, 1)) : ((Z = tr(d)).c(), (0, e.Ui)(Z, 1), Z.m(o, null)) : Z && ((0, e.dvw)(), (0, e.etI)(Z, 1, 1, function() {
              Z = null;
            }), (0, e.gbL)()), d[1] ? oe ? oe.p(d, pe) : ((oe = nr(d)).c(), oe.m(c, null)) : oe && (oe.d(1), oe = null);
          }, i: function(ue) {
            T || ((0, e.Ui)(M), (0, e.Ui)(p), (0, e.Ui)(Z), T = !0);
          }, o: function(ue) {
            (0, e.etI)(M), (0, e.etI)(p), (0, e.etI)(Z), T = !1;
          }, d: function(ue) {
            ue && (0, e.ogt)(c), M && M.d(), N[h].d(), d[27](null), Z && Z.d(), d[29](null), oe && oe.d(), d[30](null), k = !1, (0, e.j7q)(B);
          } };
        }
        function Bo(d, c, o) {
          var s, u, h, p, v, b, T, k = c.$$slots, B = k === void 0 ? {} : k, M = c.$$scope, W = (0, e.XGm)(B), N = this && this.__awaiter || function(be, Fe, $e, Ue) {
            return new ($e || ($e = Promise))(function(nt, lt) {
              function Zt(vt) {
                try {
                  Kt(Ue.next(vt));
                } catch (Nt) {
                  lt(Nt);
                }
              }
              function qt(vt) {
                try {
                  Kt(Ue.throw(vt));
                } catch (Nt) {
                  lt(Nt);
                }
              }
              function Kt(vt) {
                var Nt;
                vt.done ? nt(vt.value) : (Nt = vt.value, Nt instanceof $e ? Nt : new $e(function(fn) {
                  fn(Nt);
                })).then(Zt, qt);
              }
              Kt((Ue = Ue.apply(be, Fe || [])).next());
            });
          }, z = c.items, Z = c.itemKey, oe = Z === void 0 ? void 0 : Z, ue = c.itemHeight, pe = ue === void 0 ? void 0 : ue, Ie = c.buffer, Le = Ie === void 0 ? 200 : Ie, ze = c.stickToBottom, qe = ze !== void 0 && ze, Je = c.scrollbar, Re = Je !== void 0 && Je, Ce = c.start, Qe = Ce === void 0 ? 0 : Ce, _t = c.end, et = _t === void 0 ? 0 : _t, Ke = 0, Me = 0, _e = 0, xe = 0, rt = 100, he = 0, Se = [], Ne = [], Te = [], je = Ro(), dt = function() {
            return Math.max(0, xe + Ke + Me - _e);
          }, gt = !0, Et = !1, st = [], Ht = !1, wt = !1, zt = pi(), mt = function(be, Fe) {
            var $e;
            (0, g.H3)(function() {
              var Ue = be();
              if (Ue) {
                Fe(Ue.getBoundingClientRect().height), $e && $e.disconnect();
                var nt = Gi();
                ($e = new nt(function(lt) {
                  var Zt = lt[0];
                  Fe(Zt.contentRect.height);
                })).observe(Ue);
              } else
                Fe(0), $e && ($e.disconnect(), $e = null);
            }), (0, g.ev)(function() {
              $e && ($e.disconnect(), $e = null);
            });
          }, Yt = function() {
            var be = b.getPosition(), Fe = 100 / (xe + Ke + Me);
            o(8, he = be * Fe), o(7, rt = _e * Fe);
          }, yt = function(be) {
            var Fe = dt();
            (be || b.getPosition() > Fe) && b.updatePosition(Fe);
          }, on = function(be) {
            (function(Fe, $e, Ue) {
              for (var nt = /* @__PURE__ */ new Map(), lt = 0; lt < st.length; lt += 1) {
                var Zt = st[lt], qt = oe === void 0 ? Zt : Zt[oe];
                nt.set(qt, Se[lt]);
              }
              o(9, Ne.length = Se.length = Fe.length, Ne);
              for (var Kt = 0, vt = 0; vt < Fe.length; vt += 1) {
                var Nt = Fe[vt], fn = oe === void 0 ? Nt : Nt[oe];
                nt.has(fn) ? Se[vt] = nt.get(fn) : Se[vt] = Ue, o(9, Ne[vt] = Kt, Ne), Kt += Se[vt];
              }
              xe = Math.max(Kt, $e - Ke - Me), st = Fe, zt ? (dn(Fe, b.getPosition(), $e), o(6, v.style.height = xe + "px", v), yt(gt && qe), Yt()) : dn(Fe, 0, 9e6);
            })(be, _e, pe);
          };
          function dn(be, Fe, $e) {
            for (var Ue = 0, nt = 0; Ue < be.length && nt + Se[Ue] < Fe - Le; )
              nt += Se[Ue], Ue += 1;
            for (o(16, Qe = Ue); Ue < be.length && $e && nt < Fe + $e + Le; )
              nt += Se[Ue], Ue += 1;
            o(17, et = Ue), o(10, Te = je(be.length, Qe, et));
          }
          var On = function(be, Fe) {
            return N(void 0, void 0, void 0, at().mark(function $e() {
              var Ue, nt, lt, Zt;
              return at().wrap(function(qt) {
                for (; ; )
                  switch (qt.prev = qt.next) {
                    case 0:
                      if (Se[be] !== Fe && _e !== 0) {
                        qt.next = 2;
                        break;
                      }
                      return qt.abrupt("return");
                    case 2:
                      for (Ue = Se[be], Se[be] = Fe, nt = z.length, lt = be; lt < nt - 1; lt += 1)
                        o(9, Ne[lt + 1] = Ne[lt] + Se[lt], Ne);
                      return xe = Math.max(Ne[nt - 1] + Se[nt - 1], _e - Ke - Me), Zt = b.getPosition(), Et = !0, Ne[be] + Ue < Zt ? b.updatePosition(Zt + Fe - Ue) : yt(gt && qe), qt.next = 12, new Promise(function(Kt) {
                        return setTimeout(Kt, 0);
                      });
                    case 12:
                      dn(z, b.getPosition(), _e), o(6, v.style.height = xe + "px", v), Yt();
                    case 15:
                    case "end":
                      return qt.stop();
                  }
              }, $e);
            }));
          };
          (0, g.H3)(function() {
            o(23, Ht = !0), qi.use();
          }), (0, g.ev)(function() {
            qi.unuse();
          }), zt && (zt && (b = b || new wo(dt, function(be) {
            return N(void 0, void 0, void 0, at().mark(function Fe() {
              var $e;
              return at().wrap(function(Ue) {
                for (; ; )
                  switch (Ue.prev = Ue.next) {
                    case 0:
                      if ($e = dt(), gt = Math.abs(be - $e) <= 1, o(5, p.style.transform = "translateY(" + -be + "px) translateZ(0)", p), Yt(), !Et) {
                        Ue.next = 8;
                        break;
                      }
                      Et = !1, Ue.next = 11;
                      break;
                    case 8:
                      return Ue.next = 10, new Promise(function(nt) {
                        return setTimeout(nt, 0);
                      });
                    case 10:
                      dn(z, be, _e);
                    case 11:
                    case "end":
                      return Ue.stop();
                  }
              }, Fe);
            }));
          }), o(11, T = T || new So(b))), !wt && zt && (mt(function() {
            return h;
          }, function(be) {
            return N(void 0, void 0, void 0, at().mark(function Fe() {
              var $e, Ue;
              return at().wrap(function(nt) {
                for (; ; )
                  switch (nt.prev = nt.next) {
                    case 0:
                      if (_e !== be) {
                        nt.next = 2;
                        break;
                      }
                      return nt.abrupt("return");
                    case 2:
                      for (_e = be, $e = 0, Ue = 0; Ue < z.length; Ue += 1)
                        $e += Se[Ue];
                      return xe = Math.max($e, _e - Me), o(6, v.style.height = xe + "px", v), nt.next = 9, new Promise(function(lt) {
                        return setTimeout(lt, 0);
                      });
                    case 9:
                      on(z), dn(z, b.getPosition(), _e), _e !== 0 && yt(gt && qe), Yt();
                    case 13:
                    case "end":
                      return nt.stop();
                  }
              }, Fe);
            }));
          }), mt(function() {
            return u;
          }, function(be) {
            if (Me !== be) {
              Me = be;
              for (var Fe = 0, $e = 0; $e < z.length; $e += 1)
                Fe += Se[$e];
              xe = Math.max(Fe, _e - Ke - Me), o(6, v.style.height = xe + "px", v), _e !== 0 && yt(gt && qe), Yt();
            }
          }), mt(function() {
            return s;
          }, function(be) {
            Ke !== be && (Ke = be, on(z), Yt());
          })));
          var Hn = { scrollTo: function(be) {
            if (zt) {
              var Fe = Ne[Math.max(0, Math.min(z.length - 1, be))], $e = Math.min(dt(), Fe), Ue = Math.min(Math.floor(500 * Math.abs(b.getPosition() - $e) / 2e3), 500);
              b.scrollTo($e, Ue);
            }
          } };
          return d.$$set = function(be) {
            "items" in be && o(0, z = be.items), "itemKey" in be && o(18, oe = be.itemKey), "itemHeight" in be && o(19, pe = be.itemHeight), "buffer" in be && o(20, Le = be.buffer), "stickToBottom" in be && o(21, qe = be.stickToBottom), "scrollbar" in be && o(1, Re = be.scrollbar), "start" in be && o(16, Qe = be.start), "end" in be && o(17, et = be.end), "$$scope" in be && o(31, M = be.$$scope);
          }, d.$$.update = function() {
            8388609 & d.$$.dirty[0] && Ht && (zt || o(4, h.parentElement.style.height = "auto", h), on(z), wt = !0);
          }, [z, Re, s, u, h, p, v, rt, he, Ne, Te, T, function() {
          }, zt, On, W, Qe, et, oe, pe, Le, qe, Hn, Ht, B, function(be) {
            e.VnY[be ? "unshift" : "push"](function() {
              o(2, s = be);
            });
          }, function(be, Fe) {
            return On(be.index, Fe);
          }, function(be) {
            e.VnY[be ? "unshift" : "push"](function() {
              o(6, v = be);
            });
          }, function(be) {
            e.VnY[be ? "unshift" : "push"](function() {
              o(3, u = be);
            });
          }, function(be) {
            e.VnY[be ? "unshift" : "push"](function() {
              o(5, p = be);
            });
          }, function(be) {
            e.VnY[be ? "unshift" : "push"](function() {
              o(4, h = be), o(23, Ht), o(13, zt), o(0, z);
            });
          }, M];
        }
        var Fo = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, Bo, $o, e.N8, { items: 0, itemKey: 18, itemHeight: 19, buffer: 20, stickToBottom: 21, scrollbar: 1, start: 16, end: 17, handler: 22 }, null, [-1, -1]), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "items", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ items: o }), (0, e.yl1)();
          } }, { key: "itemKey", get: function() {
            return this.$$.ctx[18];
          }, set: function(o) {
            this.$$set({ itemKey: o }), (0, e.yl1)();
          } }, { key: "itemHeight", get: function() {
            return this.$$.ctx[19];
          }, set: function(o) {
            this.$$set({ itemHeight: o }), (0, e.yl1)();
          } }, { key: "buffer", get: function() {
            return this.$$.ctx[20];
          }, set: function(o) {
            this.$$set({ buffer: o }), (0, e.yl1)();
          } }, { key: "stickToBottom", get: function() {
            return this.$$.ctx[21];
          }, set: function(o) {
            this.$$set({ stickToBottom: o }), (0, e.yl1)();
          } }, { key: "scrollbar", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ scrollbar: o }), (0, e.yl1)();
          } }, { key: "start", get: function() {
            return this.$$.ctx[16];
          }, set: function(o) {
            this.$$set({ start: o }), (0, e.yl1)();
          } }, { key: "end", get: function() {
            return this.$$.ctx[17];
          }, set: function(o) {
            this.$$set({ end: o }), (0, e.yl1)();
          } }, { key: "handler", get: function() {
            return this.$$.ctx[22];
          } }]), c;
        }(e.f_C), ir = Fo;
        function Uo(d) {
          var c;
          return { c: function() {
            (c = (0, e.bGB)("div")).textContent = "Empty", (0, e.Ljt)(c, "slot", "empty"), (0, e.Ljt)(c, "class", "vc-plugin-empty");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, p: e.ZTd, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function No(d) {
          var c, o;
          return (c = new uo({ props: { slot: "item", log: d[16], showTimestamps: d[1], groupHeader: d[16].groupHeader } })).$on("groupCollapsed", d[6]), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: function(s, u) {
            var h = {};
            65536 & u && (h.log = s[16]), 2 & u && (h.showTimestamps = s[1]), 65536 & u && (h.groupHeader = s[16].groupHeader), c.$set(h);
          }, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function rr(d) {
          var c, o;
          return (c = new fo.Z({})).$on("filterText", d[5]), { c: function() {
            (0, e.YCL)(c.$$.fragment);
          }, m: function(s, u) {
            (0, e.yef)(c, s, u), o = !0;
          }, p: e.ZTd, i: function(s) {
            o || ((0, e.Ui)(c.$$.fragment, s), o = !0);
          }, o: function(s) {
            (0, e.etI)(c.$$.fragment, s), o = !1;
          }, d: function(s) {
            (0, e.vpE)(c, s);
          } };
        }
        function jo(d) {
          var c, o, s = d[0] && rr(d);
          return { c: function() {
            s && s.c(), c = (0, e.cSb)();
          }, m: function(u, h) {
            s && s.m(u, h), (0, e.$Tr)(u, c, h), o = !0;
          }, p: function(u, h) {
            u[0] ? s ? (s.p(u, h), 1 & h && (0, e.Ui)(s, 1)) : ((s = rr(u)).c(), (0, e.Ui)(s, 1), s.m(c.parentNode, c)) : s && ((0, e.dvw)(), (0, e.etI)(s, 1, 1, function() {
              s = null;
            }), (0, e.gbL)());
          }, i: function(u) {
            o || ((0, e.Ui)(s), o = !0);
          }, o: function(u) {
            (0, e.etI)(s), o = !1;
          }, d: function(u) {
            s && s.d(u), u && (0, e.ogt)(c);
          } };
        }
        function Vo(d) {
          var c, o, s, u;
          function h(v) {
            d[15](v);
          }
          var p = { items: d[4], itemKey: "_id", itemHeight: 30, buffer: 100, stickToBottom: !0, scrollbar: !0, $$slots: { footer: [jo], item: [No, function(v) {
            return { 16: v.item };
          }, function(v) {
            return v.item ? 65536 : 0;
          }], empty: [Uo] }, $$scope: { ctx: d } };
          return d[3] !== void 0 && (p.handler = d[3]), o = new ir({ props: p }), e.VnY.push(function() {
            return (0, e.akz)(o, "handler", h);
          }), { c: function() {
            c = (0, e.bGB)("div"), (0, e.YCL)(o.$$.fragment), (0, e.Ljt)(c, "class", "vc-plugin-content"), (0, e.VHj)(c, "vc-logs-has-cmd", d[0]);
          }, m: function(v, b) {
            (0, e.$Tr)(v, c, b), (0, e.yef)(o, c, null), u = !0;
          }, p: function(v, b) {
            var T = b[0], k = {};
            16 & T && (k.items = v[4]), 196611 & T && (k.$$scope = { dirty: T, ctx: v }), !s && 8 & T && (s = !0, k.handler = v[3], (0, e.hjT)(function() {
              return s = !1;
            })), o.$set(k), 1 & T && (0, e.VHj)(c, "vc-logs-has-cmd", v[0]);
          }, i: function(v) {
            u || ((0, e.Ui)(o.$$.fragment, v), u = !0);
          }, o: function(v) {
            (0, e.etI)(o.$$.fragment, v), u = !1;
          }, d: function(v) {
            v && (0, e.ogt)(c), (0, e.vpE)(o);
          } };
        }
        function Go(d, c, o) {
          var s, u = e.ZTd;
          d.$$.on_destroy.push(function() {
            return u();
          });
          var h, p, v = c.pluginId, b = v === void 0 ? "default" : v, T = c.showCmd, k = T !== void 0 && T, B = c.filterType, M = B === void 0 ? "all" : B, W = c.showTimestamps, N = W !== void 0 && W, z = !1, Z = "", oe = [];
          return (0, g.H3)(function() {
            Vi.use();
          }), (0, g.ev)(function() {
            Vi.unuse();
          }), d.$$set = function(ue) {
            "pluginId" in ue && o(7, b = ue.pluginId), "showCmd" in ue && o(0, k = ue.showCmd), "filterType" in ue && o(8, M = ue.filterType), "showTimestamps" in ue && o(1, N = ue.showTimestamps);
          }, d.$$.update = function() {
            29056 & d.$$.dirty && (z || (o(2, h = sn.O.get(b)), u(), u = (0, e.LdU)(h, function(ue) {
              return o(14, s = ue);
            }), o(12, z = !0)), o(4, oe = s.logList.filter(function(ue) {
              return (M === "all" || M === ue.type) && (Z === "" || (0, $t.HX)(ue, Z)) && !ue.groupCollapsed;
            })));
          }, [k, N, h, p, oe, function(ue) {
            o(13, Z = ue.detail.filterText || "");
          }, function(ue) {
            var pe = ue.detail.groupLabel, Ie = ue.detail.groupHeader, Le = ue.detail.isGroupCollapsed;
            h.update(function(ze) {
              return ze.logList.forEach(function(qe) {
                qe.groupLabel === pe && (qe.groupHeader > 0 ? qe.groupHeader = Ie : qe.groupCollapsed = Le);
              }), ze;
            });
          }, b, M, function() {
            p.scrollTo(0);
          }, function() {
            p.scrollTo(oe.length - 1);
          }, { fixedHeight: !0 }, z, Z, s, function(ue) {
            o(3, p = ue);
          }];
        }
        var Wo = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, Go, Vo, e.N8, { pluginId: 7, showCmd: 0, filterType: 8, showTimestamps: 1, scrollToTop: 9, scrollToBottom: 10, options: 11 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "pluginId", get: function() {
            return this.$$.ctx[7];
          }, set: function(o) {
            this.$$set({ pluginId: o }), (0, e.yl1)();
          } }, { key: "showCmd", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ showCmd: o }), (0, e.yl1)();
          } }, { key: "filterType", get: function() {
            return this.$$.ctx[8];
          }, set: function(o) {
            this.$$set({ filterType: o }), (0, e.yl1)();
          } }, { key: "showTimestamps", get: function() {
            return this.$$.ctx[1];
          }, set: function(o) {
            this.$$set({ showTimestamps: o }), (0, e.yl1)();
          } }, { key: "scrollToTop", get: function() {
            return this.$$.ctx[9];
          } }, { key: "scrollToBottom", get: function() {
            return this.$$.ctx[10];
          } }, { key: "options", get: function() {
            return this.$$.ctx[11];
          } }]), c;
        }(e.f_C), Ho = Wo, Zn = __webpack_require__(5629), or = function() {
          function d(c) {
            this.model = void 0, this.pluginId = void 0, this.pluginId = c;
          }
          return d.prototype.destroy = function() {
            this.model = void 0;
          }, d;
        }(), zo = function(d) {
          function c() {
            for (var s, u = arguments.length, h = new Array(u), p = 0; p < u; p++)
              h[p] = arguments[p];
            return (s = d.call.apply(d, [this].concat(h)) || this).model = Zn.W.getSingleton(Zn.W, "VConsoleLogModel"), s;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.log = function() {
            for (var s = arguments.length, u = new Array(s), h = 0; h < s; h++)
              u[h] = arguments[h];
            this.addLog.apply(this, ["log"].concat(u));
          }, o.info = function() {
            for (var s = arguments.length, u = new Array(s), h = 0; h < s; h++)
              u[h] = arguments[h];
            this.addLog.apply(this, ["info"].concat(u));
          }, o.debug = function() {
            for (var s = arguments.length, u = new Array(s), h = 0; h < s; h++)
              u[h] = arguments[h];
            this.addLog.apply(this, ["debug"].concat(u));
          }, o.warn = function() {
            for (var s = arguments.length, u = new Array(s), h = 0; h < s; h++)
              u[h] = arguments[h];
            this.addLog.apply(this, ["warn"].concat(u));
          }, o.error = function() {
            for (var s = arguments.length, u = new Array(s), h = 0; h < s; h++)
              u[h] = arguments[h];
            this.addLog.apply(this, ["error"].concat(u));
          }, o.clear = function() {
            this.model && this.model.clearPluginLog(this.pluginId);
          }, o.addLog = function(s) {
            if (this.model) {
              for (var u = arguments.length, h = new Array(u > 1 ? u - 1 : 0), p = 1; p < u; p++)
                h[p - 1] = arguments[p];
              h.unshift("[" + this.pluginId + "]"), this.model.addLog({ type: s, origData: h }, { noOrig: !0 });
            }
          }, c;
        }(or), yi = function(d) {
          function c(s, u) {
            var h;
            return (h = d.call(this, s, u, Ho, { pluginId: s, filterType: "all" }) || this).model = Zn.W.getSingleton(Zn.W, "VConsoleLogModel"), h.isReady = !1, h.isShow = !1, h.isInBottom = !0, h.model.bindPlugin(s), h.exporter = new zo(s), h;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            var s, u;
            d.prototype.onReady.call(this), this.model.maxLogNumber = Number((s = this.vConsole.option.log) == null ? void 0 : s.maxLogNumber) || 1e3, this.compInstance.showTimestamps = !((u = this.vConsole.option.log) == null || !u.showTimestamps);
          }, o.onRemove = function() {
            d.prototype.onRemove.call(this), this.model.unbindPlugin(this.id);
          }, o.onAddTopBar = function(s) {
            for (var u = this, h = ["All", "Log", "Info", "Warn", "Error"], p = [], v = 0; v < h.length; v++)
              p.push({ name: h[v], data: { type: h[v].toLowerCase() }, actived: v === 0, className: "", onClick: function(b, T) {
                if (T.type === u.compInstance.filterType)
                  return !1;
                u.compInstance.filterType = T.type;
              } });
            p[0].className = "vc-actived", s(p);
          }, o.onAddTool = function(s) {
            var u = this;
            s([{ name: "Clear", global: !1, onClick: function(h) {
              u.model.clearPluginLog(u.id), u.vConsole.triggerEvent("clearLog");
            } }, { name: "Top", global: !1, onClick: function(h) {
              u.compInstance.scrollToTop();
            } }, { name: "Bottom", global: !1, onClick: function(h) {
              u.compInstance.scrollToBottom();
            } }]);
          }, o.onUpdateOption = function() {
            var s, u, h, p;
            ((s = this.vConsole.option.log) == null ? void 0 : s.maxLogNumber) !== this.model.maxLogNumber && (this.model.maxLogNumber = Number((h = this.vConsole.option.log) == null ? void 0 : h.maxLogNumber) || 1e3), !((u = this.vConsole.option.log) == null || !u.showTimestamps) !== this.compInstance.showTimestamps && (this.compInstance.showTimestamps = !((p = this.vConsole.option.log) == null || !p.showTimestamps));
          }, c;
        }(St), sr = function(d) {
          function c() {
            for (var s, u = arguments.length, h = new Array(u), p = 0; p < u; p++)
              h[p] = arguments[p];
            return (s = d.call.apply(d, [this].concat(h)) || this).onErrorHandler = void 0, s.resourceErrorHandler = void 0, s.rejectionHandler = void 0, s;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            d.prototype.onReady.call(this), this.bindErrors(), this.compInstance.showCmd = !0;
          }, o.onRemove = function() {
            d.prototype.onRemove.call(this), this.unbindErrors();
          }, o.bindErrors = function() {
            t.FJ(window) && t.mf(window.addEventListener) && (this.catchWindowOnError(), this.catchResourceError(), this.catchUnhandledRejection());
          }, o.unbindErrors = function() {
            t.FJ(window) && t.mf(window.addEventListener) && (window.removeEventListener("error", this.onErrorHandler), window.removeEventListener("error", this.resourceErrorHandler), window.removeEventListener("unhandledrejection", this.rejectionHandler));
          }, o.catchWindowOnError = function() {
            var s = this;
            this.onErrorHandler = this.onErrorHandler ? this.onErrorHandler : function(u) {
              var h = u.message;
              u.filename && (h += "\\n\\t" + u.filename.replace(location.origin, ""), (u.lineno || u.colno) && (h += ":" + u.lineno + ":" + u.colno)), h += "\\n" + (!!u.error && !!u.error.stack && u.error.stack.toString() || ""), s.model.addLog({ type: "error", origData: [h] }, { noOrig: !0 });
            }, window.removeEventListener("error", this.onErrorHandler), window.addEventListener("error", this.onErrorHandler);
          }, o.catchResourceError = function() {
            var s = this;
            this.resourceErrorHandler = this.resourceErrorHandler ? this.resourceErrorHandler : function(u) {
              var h = u.target;
              if (["link", "video", "script", "img", "audio"].indexOf(h.localName) > -1) {
                var p = h.href || h.src || h.currentSrc;
                s.model.addLog({ type: "error", origData: ["GET <" + h.localName + "> error: " + p] }, { noOrig: !0 });
              }
            }, window.removeEventListener("error", this.resourceErrorHandler), window.addEventListener("error", this.resourceErrorHandler, !0);
          }, o.catchUnhandledRejection = function() {
            var s = this;
            this.rejectionHandler = this.rejectionHandler ? this.rejectionHandler : function(u) {
              var h = u && u.reason, p = "Uncaught (in promise) ", v = [p, h];
              h instanceof Error && (v = [p, { name: h.name, message: h.message, stack: h.stack }]), s.model.addLog({ type: "error", origData: v }, { noOrig: !0 });
            }, window.removeEventListener("unhandledrejection", this.rejectionHandler), window.addEventListener("unhandledrejection", this.rejectionHandler);
          }, c;
        }(yi), ar = function(d) {
          function c() {
            return d.apply(this, arguments) || this;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            d.prototype.onReady.call(this), this.printSystemInfo();
          }, o.printSystemInfo = function() {
            var s = navigator.userAgent, u = [], h = s.match(/MicroMessenger\/([\d\.]+)/i), p = h && h[1] ? h[1] : null;
            location.host === "servicewechat.com" || console.info("[system]", "Location:", location.href);
            var v = s.match(/(ipod).*\s([\d_]+)/i), b = s.match(/(ipad).*\s([\d_]+)/i), T = s.match(/(iphone)\sos\s([\d_]+)/i), k = s.match(/(android)\s([\d\.]+)/i), B = s.match(/(Mac OS X)\s([\d_]+)/i);
            u = [], k ? u.push("Android " + k[2]) : T ? u.push("iPhone, iOS " + T[2].replace(/_/g, ".")) : b ? u.push("iPad, iOS " + b[2].replace(/_/g, ".")) : v ? u.push("iPod, iOS " + v[2].replace(/_/g, ".")) : B && u.push("Mac, MacOS " + B[2].replace(/_/g, ".")), p && u.push("WeChat " + p), console.info("[system]", "Client:", u.length ? u.join(", ") : "Unknown");
            var M = s.toLowerCase().match(/ nettype\/([^ ]+)/g);
            M && M[0] && (u = [(M = M[0].split("/"))[1]], console.info("[system]", "Network:", u.length ? u.join(", ") : "Unknown")), console.info("[system]", "UA:", s), setTimeout(function() {
              var W = window.performance || window.msPerformance || window.webkitPerformance;
              if (W && W.timing) {
                var N = W.timing;
                N.navigationStart && console.info("[system]", "navigationStart:", N.navigationStart), N.navigationStart && N.domainLookupStart && console.info("[system]", "navigation:", N.domainLookupStart - N.navigationStart + "ms"), N.domainLookupEnd && N.domainLookupStart && console.info("[system]", "dns:", N.domainLookupEnd - N.domainLookupStart + "ms"), N.connectEnd && N.connectStart && (N.connectEnd && N.secureConnectionStart ? console.info("[system]", "tcp (ssl):", N.connectEnd - N.connectStart + "ms (" + (N.connectEnd - N.secureConnectionStart) + "ms)") : console.info("[system]", "tcp:", N.connectEnd - N.connectStart + "ms")), N.responseStart && N.requestStart && console.info("[system]", "request:", N.responseStart - N.requestStart + "ms"), N.responseEnd && N.responseStart && console.info("[system]", "response:", N.responseEnd - N.responseStart + "ms"), N.domComplete && N.domLoading && (N.domContentLoadedEventStart && N.domLoading ? console.info("[system]", "domComplete (domLoaded):", N.domComplete - N.domLoading + "ms (" + (N.domContentLoadedEventStart - N.domLoading) + "ms)") : console.info("[system]", "domComplete:", N.domComplete - N.domLoading + "ms")), N.loadEventEnd && N.loadEventStart && console.info("[system]", "loadEvent:", N.loadEventEnd - N.loadEventStart + "ms"), N.navigationStart && N.loadEventEnd && console.info("[system]", "total (DOM):", N.loadEventEnd - N.navigationStart + "ms (" + (N.domComplete - N.navigationStart) + "ms)");
              }
            }, 0);
          }, c;
        }(yi), Rt = __webpack_require__(3313), lr = __webpack_require__(643);
        function bi(d, c) {
          var o = typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
          if (o)
            return (o = o.call(d)).next.bind(o);
          if (Array.isArray(d) || (o = function(u, h) {
            if (u) {
              if (typeof u == "string")
                return cr(u, h);
              var p = Object.prototype.toString.call(u).slice(8, -1);
              if (p === "Object" && u.constructor && (p = u.constructor.name), p === "Map" || p === "Set")
                return Array.from(u);
              if (p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))
                return cr(u, h);
            }
          }(d)) || c && d && typeof d.length == "number") {
            o && (d = o);
            var s = 0;
            return function() {
              return s >= d.length ? { done: !0 } : { done: !1, value: d[s++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function cr(d, c) {
          (c == null || c > d.length) && (c = d.length);
          for (var o = 0, s = new Array(c); o < c; o++)
            s[o] = d[o];
          return s;
        }
        var ur = function(d, c) {
          c === void 0 && (c = {}), t.Kn(c) || (c = {});
          var o = d ? d.split("?") : [];
          if (o.shift(), o.length > 0)
            for (var s, u = bi(o = o.join("?").split("&")); !(s = u()).done; ) {
              var h = s.value.split("=");
              try {
                c[h[0]] = decodeURIComponent(h[1]);
              } catch {
                c[h[0]] = h[1];
              }
            }
          return c;
        }, In = function(d, c) {
          var o = "";
          switch (d) {
            case "":
            case "text":
            case "json":
              if (t.HD(c))
                try {
                  o = JSON.parse(c), o = t.hZ(o, { maxDepth: 10, keyMaxLen: 1e4, pretty: !0, standardJSON: !0 });
                } catch {
                  o = t.id(String(c), 1e4);
                }
              else
                t.Kn(c) || t.kJ(c) ? o = t.hZ(c, { maxDepth: 10, keyMaxLen: 1e4, pretty: !0, standardJSON: !0 }) : c !== void 0 && (o = Object.prototype.toString.call(c));
              break;
            default:
              c !== void 0 && (o = Object.prototype.toString.call(c));
          }
          return o;
        }, xi = function(d) {
          if (!d)
            return null;
          var c = null;
          if (typeof d == "string")
            try {
              c = JSON.parse(d);
            } catch {
              var o = d.split("&");
              if (o.length === 1)
                c = d;
              else {
                c = {};
                for (var s, u = bi(o); !(s = u()).done; ) {
                  var h = s.value.split("=");
                  c[h[0]] = h[1] === void 0 ? "undefined" : h[1];
                }
              }
            }
          else if (t.TW(d)) {
            c = {};
            for (var p, v = bi(d); !(p = v()).done; ) {
              var b = p.value, T = b[0], k = b[1];
              c[T] = typeof k == "string" ? k : "[object Object]";
            }
          } else
            t.PO(d) ? c = d : c = "[object " + t.zl(d) + "]";
          return c;
        }, Ei = function(d) {
          return d === void 0 && (d = ""), d.startsWith("//") && (d = "" + new URL(window.location.href).protocol + d), d.startsWith("http") ? new URL(d) : new URL(d, window.location.href);
        }, jn = function() {
          this.id = "", this.name = "", this.method = "", this.url = "", this.status = 0, this.statusText = "", this.cancelState = 0, this.readyState = 0, this.header = null, this.responseType = "", this.requestType = void 0, this.requestHeader = null, this.response = void 0, this.responseSize = 0, this.responseSizeText = "", this.startTime = 0, this.startTimeText = "", this.endTime = 0, this.costTime = 0, this.getData = null, this.postData = null, this.actived = !1, this.noVConsole = !1, this.id = (0, t.QI)();
        }, dr = function(d) {
          function c(o) {
            var s;
            return (s = d.call(this) || this)._response = void 0, new Proxy(o, c.Handler) || (0, l.Z)(s);
          }
          return (0, a.Z)(c, d), c;
        }(jn);
        dr.Handler = { get: function(d, c) {
          return c === "response" ? d._response : Reflect.get(d, c);
        }, set: function(d, c, o) {
          var s;
          switch (c) {
            case "response":
              return d._response = In(d.responseType, o), !0;
            case "url":
              var u = ((s = o = String(o)) == null ? void 0 : s.replace(new RegExp("[/]*$"), "").split("/").pop()) || "Unknown";
              Reflect.set(d, "name", u);
              var h = ur(o, d.getData);
              Reflect.set(d, "getData", h);
              break;
            case "status":
              var p = String(o) || "Unknown";
              Reflect.set(d, "statusText", p);
              break;
            case "startTime":
              if (o && d.endTime) {
                var v = d.endTime - o;
                Reflect.set(d, "costTime", v);
              }
              break;
            case "endTime":
              if (o && d.startTime) {
                var b = o - d.startTime;
                Reflect.set(d, "costTime", b);
              }
          }
          return Reflect.set(d, c, o);
        } };
        var qo = function() {
          function d(o, s) {
            var u = this;
            this.XMLReq = void 0, this.item = void 0, this.onUpdateCallback = void 0, this.XMLReq = o, this.XMLReq.onreadystatechange = function() {
              u.onReadyStateChange();
            }, this.XMLReq.onabort = function() {
              u.onAbort();
            }, this.XMLReq.ontimeout = function() {
              u.onTimeout();
            }, this.item = new jn(), this.item.requestType = "xhr", this.onUpdateCallback = s;
          }
          var c = d.prototype;
          return c.get = function(o, s) {
            switch (s) {
              case "_noVConsole":
                return this.item.noVConsole;
              case "open":
                return this.getOpen(o);
              case "send":
                return this.getSend(o);
              case "setRequestHeader":
                return this.getSetRequestHeader(o);
              default:
                var u = Reflect.get(o, s);
                return typeof u == "function" ? u.bind(o) : u;
            }
          }, c.set = function(o, s, u) {
            switch (s) {
              case "_noVConsole":
                return void (this.item.noVConsole = !!u);
              case "onreadystatechange":
                return this.setOnReadyStateChange(o, s, u);
              case "onabort":
                return this.setOnAbort(o, s, u);
              case "ontimeout":
                return this.setOnTimeout(o, s, u);
            }
            return Reflect.set(o, s, u);
          }, c.onReadyStateChange = function() {
            this.item.readyState = this.XMLReq.readyState, this.item.responseType = this.XMLReq.responseType, this.item.endTime = Date.now(), this.item.costTime = this.item.endTime - this.item.startTime, this.updateItemByReadyState(), this.item.response = In(this.item.responseType, this.item.response), this.triggerUpdate();
          }, c.onAbort = function() {
            this.item.cancelState = 1, this.item.statusText = "Abort", this.triggerUpdate();
          }, c.onTimeout = function() {
            this.item.cancelState = 3, this.item.statusText = "Timeout", this.triggerUpdate();
          }, c.triggerUpdate = function() {
            this.item.noVConsole || this.onUpdateCallback(this.item);
          }, c.getOpen = function(o) {
            var s = this, u = Reflect.get(o, "open");
            return function() {
              for (var h = arguments.length, p = new Array(h), v = 0; v < h; v++)
                p[v] = arguments[v];
              var b = p[0], T = p[1];
              return s.item.method = b ? b.toUpperCase() : "GET", s.item.url = T || "", s.item.name = s.item.url.replace(new RegExp("[/]*$"), "").split("/").pop() || "", s.item.getData = ur(s.item.url, {}), s.triggerUpdate(), u.apply(o, p);
            };
          }, c.getSend = function(o) {
            var s = this, u = Reflect.get(o, "send");
            return function() {
              for (var h = arguments.length, p = new Array(h), v = 0; v < h; v++)
                p[v] = arguments[v];
              var b = p[0];
              return s.item.postData = xi(b), s.triggerUpdate(), u.apply(o, p);
            };
          }, c.getSetRequestHeader = function(o) {
            var s = this, u = Reflect.get(o, "setRequestHeader");
            return function() {
              s.item.requestHeader || (s.item.requestHeader = {});
              for (var h = arguments.length, p = new Array(h), v = 0; v < h; v++)
                p[v] = arguments[v];
              return s.item.requestHeader[p[0]] = p[1], s.triggerUpdate(), u.apply(o, p);
            };
          }, c.setOnReadyStateChange = function(o, s, u) {
            var h = this;
            return Reflect.set(o, s, function() {
              h.onReadyStateChange();
              for (var p = arguments.length, v = new Array(p), b = 0; b < p; b++)
                v[b] = arguments[b];
              u.apply(o, v);
            });
          }, c.setOnAbort = function(o, s, u) {
            var h = this;
            return Reflect.set(o, s, function() {
              h.onAbort();
              for (var p = arguments.length, v = new Array(p), b = 0; b < p; b++)
                v[b] = arguments[b];
              u.apply(o, v);
            });
          }, c.setOnTimeout = function(o, s, u) {
            var h = this;
            return Reflect.set(o, s, function() {
              h.onTimeout();
              for (var p = arguments.length, v = new Array(p), b = 0; b < p; b++)
                v[b] = arguments[b];
              u.apply(o, v);
            });
          }, c.updateItemByReadyState = function() {
            switch (this.XMLReq.readyState) {
              case 0:
              case 1:
                if (this.item.status = 0, this.item.statusText = "Pending", !this.item.startTime) {
                  this.item.startTime = Date.now();
                  var o = (0, t._3)(this.item.startTime);
                  this.item.startTimeText = o.year + "-" + o.month + "-" + o.day + " " + o.hour + ":" + o.minute + ":" + o.second + "." + o.millisecond;
                }
                break;
              case 2:
                this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.item.header = {};
                for (var s = (this.XMLReq.getAllResponseHeaders() || "").split(`
`), u = 0; u < s.length; u++) {
                  var h = s[u];
                  if (h) {
                    var p = h.split(": "), v = p[0], b = p.slice(1).join(": ");
                    this.item.header[v] = b;
                  }
                }
                break;
              case 3:
                this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = (0, t.KL)(this.item.responseSize));
                break;
              case 4:
                this.item.status = this.XMLReq.status || this.item.status || 0, this.item.statusText = String(this.item.status), this.item.endTime = Date.now(), this.item.costTime = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = this.XMLReq.response, this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = (0, t.KL)(this.item.responseSize));
                break;
              default:
                this.item.status = this.XMLReq.status, this.item.statusText = "Unknown";
            }
          }, d;
        }(), wi = function() {
          function d() {
          }
          return d.create = function(c) {
            return new Proxy(XMLHttpRequest, { construct: function(o) {
              var s = new o();
              return new Proxy(s, new qo(s, c));
            } });
          }, d;
        }();
        function Ti(d, c) {
          var o = typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
          if (o)
            return (o = o.call(d)).next.bind(o);
          if (Array.isArray(d) || (o = function(u, h) {
            if (u) {
              if (typeof u == "string")
                return fr(u, h);
              var p = Object.prototype.toString.call(u).slice(8, -1);
              if (p === "Object" && u.constructor && (p = u.constructor.name), p === "Map" || p === "Set")
                return Array.from(u);
              if (p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))
                return fr(u, h);
            }
          }(d)) || c && d && typeof d.length == "number") {
            o && (d = o);
            var s = 0;
            return function() {
              return s >= d.length ? { done: !0 } : { done: !1, value: d[s++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function fr(d, c) {
          (c == null || c > d.length) && (c = d.length);
          for (var o = 0, s = new Array(c); o < c; o++)
            s[o] = d[o];
          return s;
        }
        wi.origXMLHttpRequest = XMLHttpRequest;
        var Ko = function() {
          function d(o, s, u) {
            this.resp = void 0, this.item = void 0, this.onUpdateCallback = void 0, this.resp = o, this.item = s, this.onUpdateCallback = u, this.mockReader();
          }
          var c = d.prototype;
          return c.set = function(o, s, u) {
            return Reflect.set(o, s, u);
          }, c.get = function(o, s) {
            var u = this, h = Reflect.get(o, s);
            switch (s) {
              case "arrayBuffer":
              case "blob":
              case "formData":
              case "json":
              case "text":
                return function() {
                  return u.item.responseType = s.toLowerCase(), h.apply(o).then(function(p) {
                    return u.item.response = In(u.item.responseType, p), u.onUpdateCallback(u.item), p;
                  });
                };
            }
            return typeof h == "function" ? h.bind(o) : h;
          }, c.mockReader = function() {
            var o, s = this;
            if (this.resp.body && typeof this.resp.body.getReader == "function") {
              var u = this.resp.body.getReader;
              this.resp.body.getReader = function() {
                var h = u.apply(s.resp.body);
                if (s.item.readyState === 4)
                  return h;
                var p = h.read, v = h.cancel;
                return s.item.responseType = "arraybuffer", h.read = function() {
                  return p.apply(h).then(function(b) {
                    if (o) {
                      var T = new Uint8Array(o.length + b.value.length);
                      T.set(o), T.set(b.value, o.length), o = T;
                    } else
                      o = new Uint8Array(b.value);
                    return s.item.endTime = Date.now(), s.item.costTime = s.item.endTime - (s.item.startTime || s.item.endTime), s.item.readyState = b.done ? 4 : 3, s.item.statusText = b.done ? String(s.item.status) : "Loading", s.item.responseSize = o.length, s.item.responseSizeText = t.KL(s.item.responseSize), b.done && (s.item.response = In(s.item.responseType, o)), s.onUpdateCallback(s.item), b;
                  });
                }, h.cancel = function() {
                  s.item.cancelState = 2, s.item.statusText = "Cancel", s.item.endTime = Date.now(), s.item.costTime = s.item.endTime - (s.item.startTime || s.item.endTime), s.item.response = In(s.item.responseType, o), s.onUpdateCallback(s.item);
                  for (var b = arguments.length, T = new Array(b), k = 0; k < b; k++)
                    T[k] = arguments[k];
                  return v.apply(h, T);
                }, h;
              };
            }
          }, d;
        }(), Xo = function() {
          function d(o) {
            this.onUpdateCallback = void 0, this.onUpdateCallback = o;
          }
          var c = d.prototype;
          return c.apply = function(o, s, u) {
            var h = this, p = u[0], v = u[1], b = new jn();
            return this.beforeFetch(b, p, v), o.apply(window, u).then(this.afterFetch(b)).catch(function(T) {
              throw b.endTime = Date.now(), b.costTime = b.endTime - (b.startTime || b.endTime), h.onUpdateCallback(b), T;
            });
          }, c.beforeFetch = function(o, s, u) {
            var h, p = "GET", v = null;
            if (t.HD(s) ? (p = (u == null ? void 0 : u.method) || "GET", h = Ei(s), v = (u == null ? void 0 : u.headers) || null) : (p = s.method || "GET", h = Ei(s.url), v = s.headers), o.method = p, o.requestType = "fetch", o.requestHeader = v, o.url = h.toString(), o.name = (h.pathname.split("/").pop() || "") + h.search, o.status = 0, o.statusText = "Pending", o.readyState = 1, !o.startTime) {
              o.startTime = Date.now();
              var b = t._3(o.startTime);
              o.startTimeText = b.year + "-" + b.month + "-" + b.day + " " + b.hour + ":" + b.minute + ":" + b.second + "." + b.millisecond;
            }
            if (Object.prototype.toString.call(v) === "[object Headers]") {
              o.requestHeader = {};
              for (var T, k = Ti(v); !(T = k()).done; ) {
                var B = T.value, M = B[0], W = B[1];
                o.requestHeader[M] = W;
              }
            } else
              o.requestHeader = v;
            if (h.search && h.searchParams) {
              o.getData = {};
              for (var N, z = Ti(h.searchParams); !(N = z()).done; ) {
                var Z = N.value, oe = Z[0], ue = Z[1];
                o.getData[oe] = ue;
              }
            }
            u != null && u.body && (o.postData = xi(u.body)), this.onUpdateCallback(o);
          }, c.afterFetch = function(o) {
            var s = this;
            return function(u) {
              o.endTime = Date.now(), o.costTime = o.endTime - (o.startTime || o.endTime), o.status = u.status, o.statusText = String(u.status);
              var h = !1;
              o.header = {};
              for (var p, v = Ti(u.headers); !(p = v()).done; ) {
                var b = p.value, T = b[0], k = b[1];
                o.header[T] = k, h = k.toLowerCase().indexOf("chunked") > -1 || h;
              }
              return h ? o.readyState = 3 : (o.readyState = 4, s.handleResponseBody(u.clone(), o).then(function(B) {
                o.responseSize = typeof B == "string" ? B.length : B.byteLength, o.responseSizeText = t.KL(o.responseSize), o.response = In(o.responseType, B), s.onUpdateCallback(o);
              })), s.onUpdateCallback(o), new Proxy(u, new Ko(u, o, s.onUpdateCallback));
            };
          }, c.handleResponseBody = function(o, s) {
            var u = o.headers.get("content-type");
            return u && u.includes("application/json") ? (s.responseType = "json", o.text()) : u && (u.includes("text/html") || u.includes("text/plain")) ? (s.responseType = "text", o.text()) : (s.responseType = "arraybuffer", o.arrayBuffer());
          }, d;
        }(), Li = function() {
          function d() {
          }
          return d.create = function(c) {
            return new Proxy(fetch, new Xo(c));
          }, d;
        }();
        function Yo(d, c) {
          var o = typeof Symbol < "u" && d[Symbol.iterator] || d["@@iterator"];
          if (o)
            return (o = o.call(d)).next.bind(o);
          if (Array.isArray(d) || (o = function(u, h) {
            if (u) {
              if (typeof u == "string")
                return hr(u, h);
              var p = Object.prototype.toString.call(u).slice(8, -1);
              if (p === "Object" && u.constructor && (p = u.constructor.name), p === "Map" || p === "Set")
                return Array.from(u);
              if (p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))
                return hr(u, h);
            }
          }(d)) || c && d && typeof d.length == "number") {
            o && (d = o);
            var s = 0;
            return function() {
              return s >= d.length ? { done: !0 } : { done: !1, value: d[s++] };
            };
          }
          throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function hr(d, c) {
          (c == null || c > d.length) && (c = d.length);
          for (var o = 0, s = new Array(c); o < c; o++)
            s[o] = d[o];
          return s;
        }
        Li.origFetch = fetch;
        var Zo = function(d) {
          return d instanceof Blob ? d.type : d instanceof FormData ? "multipart/form-data" : d instanceof URLSearchParams ? "application/x-www-form-urlencoded;charset=UTF-8" : "text/plain;charset=UTF-8";
        }, Jo = function() {
          function d(c) {
            this.onUpdateCallback = void 0, this.onUpdateCallback = c;
          }
          return d.prototype.apply = function(c, o, s) {
            var u = s[0], h = s[1], p = new jn(), v = Ei(u);
            if (p.method = "POST", p.url = u, p.name = (v.pathname.split("/").pop() || "") + v.search, p.requestType = "ping", p.requestHeader = { "Content-Type": Zo(h) }, p.status = 0, p.statusText = "Pending", v.search && v.searchParams) {
              p.getData = {};
              for (var b, T = Yo(v.searchParams); !(b = T()).done; ) {
                var k = b.value, B = k[0], M = k[1];
                p.getData[B] = M;
              }
            }
            p.postData = xi(h), p.startTime || (p.startTime = Date.now()), this.onUpdateCallback(p);
            var W = c.apply(o, s);
            return W ? (p.endTime = Date.now(), p.costTime = p.endTime - (p.startTime || p.endTime), p.status = 0, p.statusText = "Sent", p.readyState = 4) : (p.status = 500, p.statusText = "Unknown"), this.onUpdateCallback(p), W;
          }, d;
        }(), Si = function() {
          function d() {
          }
          return d.create = function(c) {
            return new Proxy(navigator.sendBeacon, new Jo(c));
          }, d;
        }();
        Si.origSendBeacon = navigator.sendBeacon;
        var vn = (0, Rt.fZ)({}), Jn = function(d) {
          function c() {
            var s;
            return (s = d.call(this) || this).maxNetworkNumber = 1e3, s.ignoreUrlRegExp = void 0, s.itemCounter = 0, s.mockXHR(), s.mockFetch(), s.mockSendBeacon(), s;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.unMock = function() {
            window.hasOwnProperty("XMLHttpRequest") && (window.XMLHttpRequest = wi.origXMLHttpRequest), window.hasOwnProperty("fetch") && (window.fetch = Li.origFetch), window.navigator.sendBeacon && (window.navigator.sendBeacon = Si.origSendBeacon);
          }, o.clearLog = function() {
            vn.set({});
          }, o.updateRequest = function(s, u) {
            var h, p = u.url;
            if (!p || (h = this.ignoreUrlRegExp) == null || !h.test(p)) {
              var v = (0, Rt.U2)(vn), b = !!v[s];
              if (b) {
                var T = v[s];
                for (var k in u)
                  T[k] = u[k];
                u = T;
              }
              vn.update(function(B) {
                return B[s] = u, B;
              }), b || (K.x.updateTime(), this.limitListLength());
            }
          }, o.mockXHR = function() {
            var s = this;
            window.hasOwnProperty("XMLHttpRequest") && (window.XMLHttpRequest = wi.create(function(u) {
              s.updateRequest(u.id, u);
            }));
          }, o.mockFetch = function() {
            var s = this;
            window.hasOwnProperty("fetch") && (window.fetch = Li.create(function(u) {
              s.updateRequest(u.id, u);
            }));
          }, o.mockSendBeacon = function() {
            var s, u, h = this;
            (s = window) != null && (u = s.navigator) != null && u.sendBeacon && (window.navigator.sendBeacon = Si.create(function(p) {
              h.updateRequest(p.id, p);
            }));
          }, o.limitListLength = function() {
            var s = this;
            if (this.itemCounter++, this.itemCounter % 10 == 0) {
              this.itemCounter = 0;
              var u = (0, Rt.U2)(vn), h = Object.keys(u);
              h.length > this.maxNetworkNumber - 10 && vn.update(function(p) {
                for (var v = h.splice(0, h.length - s.maxNetworkNumber + 10), b = 0; b < v.length; b++)
                  p[v[b]] = void 0, delete p[v[b]];
                return p;
              });
            }
          }, c;
        }(lr.N), Qn = __webpack_require__(8747), Vn = {};
        Qn.Z && Qn.Z.locals && (Vn.locals = Qn.Z.locals);
        var Ri, Ci = 0, Tn = {};
        Tn.styleTagTransform = O(), Tn.setAttributes = I(), Tn.insert = L().bind(null, "head"), Tn.domAPI = E(), Tn.insertStyleElement = w(), Vn.use = function(d) {
          return Tn.options = d || {}, Ci++ || (Ri = y()(Qn.Z, Tn)), Vn;
        }, Vn.unuse = function() {
          Ci > 0 && !--Ci && (Ri(), Ri = null);
        };
        var mr = Vn;
        function pr(d, c, o) {
          var s = d.slice();
          return s[11] = c[o][0], s[12] = c[o][1], s;
        }
        function gr(d, c, o) {
          var s = d.slice();
          return s[11] = c[o][0], s[12] = c[o][1], s;
        }
        function vr(d, c, o) {
          var s = d.slice();
          return s[11] = c[o][0], s[12] = c[o][1], s;
        }
        function _r(d, c, o) {
          var s = d.slice();
          return s[11] = c[o][0], s[12] = c[o][1], s;
        }
        function yr(d) {
          var c, o, s;
          return { c: function() {
            c = (0, e.fLW)("("), o = (0, e.fLW)(d[0]), s = (0, e.fLW)(")");
          }, m: function(u, h) {
            (0, e.$Tr)(u, c, h), (0, e.$Tr)(u, o, h), (0, e.$Tr)(u, s, h);
          }, p: function(u, h) {
            1 & h && (0, e.rTO)(o, u[0]);
          }, d: function(u) {
            u && (0, e.ogt)(c), u && (0, e.ogt)(o), u && (0, e.ogt)(s);
          } };
        }
        function Qo(d) {
          var c, o, s, u, h, p, v = d[0] > 0 && yr(d);
          return { c: function() {
            c = (0, e.bGB)("dl"), o = (0, e.bGB)("dd"), s = (0, e.fLW)("Name "), v && v.c(), (u = (0, e.bGB)("dd")).textContent = "Method", (h = (0, e.bGB)("dd")).textContent = "Status", (p = (0, e.bGB)("dd")).textContent = "Time", (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-4"), (0, e.Ljt)(u, "class", "vc-table-col"), (0, e.Ljt)(h, "class", "vc-table-col"), (0, e.Ljt)(p, "class", "vc-table-col"), (0, e.Ljt)(c, "class", "vc-table-row");
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), (0, e.R3I)(o, s), v && v.m(o, null), (0, e.R3I)(c, u), (0, e.R3I)(c, h), (0, e.R3I)(c, p);
          }, p: function(b, T) {
            b[0] > 0 ? v ? v.p(b, T) : ((v = yr(b)).c(), v.m(o, null)) : v && (v.d(1), v = null);
          }, d: function(b) {
            b && (0, e.ogt)(c), v && v.d();
          } };
        }
        function es(d) {
          var c;
          return { c: function() {
            (c = (0, e.bGB)("div")).textContent = "Empty", (0, e.Ljt)(c, "slot", "empty"), (0, e.Ljt)(c, "class", "vc-plugin-empty");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, p: e.ZTd, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function br(d) {
          var c, o, s, u, h, p, v, b;
          p = new xt({ props: { content: d[10].requestHeader } });
          for (var T = Object.entries(d[10].requestHeader), k = [], B = 0; B < T.length; B += 1)
            k[B] = xr(_r(d, T, B));
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("dl"), s = (0, e.bGB)("dt"), u = (0, e.fLW)(`Request Headers
                `), h = (0, e.bGB)("i"), (0, e.YCL)(p.$$.fragment), v = (0, e.DhX)();
            for (var M = 0; M < k.length; M += 1)
              k[M].c();
            (0, e.Ljt)(h, "class", "vc-table-row-icon"), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(o, "class", "vc-table-row vc-left-border");
          }, m: function(M, W) {
            (0, e.$Tr)(M, c, W), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(s, u), (0, e.R3I)(s, h), (0, e.yef)(p, h, null), (0, e.R3I)(c, v);
            for (var N = 0; N < k.length; N += 1)
              k[N].m(c, null);
            b = !0;
          }, p: function(M, W) {
            var N = {};
            if (1024 & W && (N.content = M[10].requestHeader), p.$set(N), 1040 & W) {
              var z;
              for (T = Object.entries(M[10].requestHeader), z = 0; z < T.length; z += 1) {
                var Z = _r(M, T, z);
                k[z] ? k[z].p(Z, W) : (k[z] = xr(Z), k[z].c(), k[z].m(c, null));
              }
              for (; z < k.length; z += 1)
                k[z].d(1);
              k.length = T.length;
            }
          }, i: function(M) {
            b || ((0, e.Ui)(p.$$.fragment, M), b = !0);
          }, o: function(M) {
            (0, e.etI)(p.$$.fragment, M), b = !1;
          }, d: function(M) {
            M && (0, e.ogt)(c), (0, e.vpE)(p), (0, e.RMB)(k, M);
          } };
        }
        function xr(d) {
          var c, o, s, u, h, p, v, b = d[11] + "", T = d[4](d[12]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), s = (0, e.fLW)(b), u = (0, e.DhX)(), h = (0, e.bGB)("div"), p = (0, e.fLW)(T), v = (0, e.DhX)(), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(h, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(k, B) {
            (0, e.$Tr)(k, c, B), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(c, u), (0, e.R3I)(c, h), (0, e.R3I)(h, p), (0, e.R3I)(c, v);
          }, p: function(k, B) {
            1024 & B && b !== (b = k[11] + "") && (0, e.rTO)(s, b), 1024 & B && T !== (T = k[4](k[12]) + "") && (0, e.rTO)(p, T);
          }, d: function(k) {
            k && (0, e.ogt)(c);
          } };
        }
        function Er(d) {
          var c, o, s, u, h, p, v, b;
          p = new xt({ props: { content: d[10].getData } });
          for (var T = Object.entries(d[10].getData), k = [], B = 0; B < T.length; B += 1)
            k[B] = wr(vr(d, T, B));
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("dl"), s = (0, e.bGB)("dt"), u = (0, e.fLW)(`Query String Parameters
                `), h = (0, e.bGB)("i"), (0, e.YCL)(p.$$.fragment), v = (0, e.DhX)();
            for (var M = 0; M < k.length; M += 1)
              k[M].c();
            (0, e.Ljt)(h, "class", "vc-table-row-icon"), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(o, "class", "vc-table-row vc-left-border");
          }, m: function(M, W) {
            (0, e.$Tr)(M, c, W), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(s, u), (0, e.R3I)(s, h), (0, e.yef)(p, h, null), (0, e.R3I)(c, v);
            for (var N = 0; N < k.length; N += 1)
              k[N].m(c, null);
            b = !0;
          }, p: function(M, W) {
            var N = {};
            if (1024 & W && (N.content = M[10].getData), p.$set(N), 1040 & W) {
              var z;
              for (T = Object.entries(M[10].getData), z = 0; z < T.length; z += 1) {
                var Z = vr(M, T, z);
                k[z] ? k[z].p(Z, W) : (k[z] = wr(Z), k[z].c(), k[z].m(c, null));
              }
              for (; z < k.length; z += 1)
                k[z].d(1);
              k.length = T.length;
            }
          }, i: function(M) {
            b || ((0, e.Ui)(p.$$.fragment, M), b = !0);
          }, o: function(M) {
            (0, e.etI)(p.$$.fragment, M), b = !1;
          }, d: function(M) {
            M && (0, e.ogt)(c), (0, e.vpE)(p), (0, e.RMB)(k, M);
          } };
        }
        function wr(d) {
          var c, o, s, u, h, p, v, b = d[11] + "", T = d[4](d[12]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), s = (0, e.fLW)(b), u = (0, e.DhX)(), h = (0, e.bGB)("div"), p = (0, e.fLW)(T), v = (0, e.DhX)(), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(h, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(k, B) {
            (0, e.$Tr)(k, c, B), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(c, u), (0, e.R3I)(c, h), (0, e.R3I)(h, p), (0, e.R3I)(c, v);
          }, p: function(k, B) {
            1024 & B && b !== (b = k[11] + "") && (0, e.rTO)(s, b), 1024 & B && T !== (T = k[4](k[12]) + "") && (0, e.rTO)(p, T);
          }, d: function(k) {
            k && (0, e.ogt)(c);
          } };
        }
        function Tr(d) {
          var c, o, s, u, h, p, v, b;
          function T(M, W) {
            return typeof M[10].postData == "string" ? ns : ts;
          }
          p = new xt({ props: { content: d[10].postData } });
          var k = T(d), B = k(d);
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("dl"), s = (0, e.bGB)("dt"), u = (0, e.fLW)(`Request Payload
                `), h = (0, e.bGB)("i"), (0, e.YCL)(p.$$.fragment), v = (0, e.DhX)(), B.c(), (0, e.Ljt)(h, "class", "vc-table-row-icon"), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(o, "class", "vc-table-row vc-left-border");
          }, m: function(M, W) {
            (0, e.$Tr)(M, c, W), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(s, u), (0, e.R3I)(s, h), (0, e.yef)(p, h, null), (0, e.R3I)(c, v), B.m(c, null), b = !0;
          }, p: function(M, W) {
            var N = {};
            1024 & W && (N.content = M[10].postData), p.$set(N), k === (k = T(M)) && B ? B.p(M, W) : (B.d(1), (B = k(M)) && (B.c(), B.m(c, null)));
          }, i: function(M) {
            b || ((0, e.Ui)(p.$$.fragment, M), b = !0);
          }, o: function(M) {
            (0, e.etI)(p.$$.fragment, M), b = !1;
          }, d: function(M) {
            M && (0, e.ogt)(c), (0, e.vpE)(p), B.d();
          } };
        }
        function ts(d) {
          for (var c, o = Object.entries(d[10].postData), s = [], u = 0; u < o.length; u += 1)
            s[u] = Lr(gr(d, o, u));
          return { c: function() {
            for (var h = 0; h < s.length; h += 1)
              s[h].c();
            c = (0, e.cSb)();
          }, m: function(h, p) {
            for (var v = 0; v < s.length; v += 1)
              s[v].m(h, p);
            (0, e.$Tr)(h, c, p);
          }, p: function(h, p) {
            if (1040 & p) {
              var v;
              for (o = Object.entries(h[10].postData), v = 0; v < o.length; v += 1) {
                var b = gr(h, o, v);
                s[v] ? s[v].p(b, p) : (s[v] = Lr(b), s[v].c(), s[v].m(c.parentNode, c));
              }
              for (; v < s.length; v += 1)
                s[v].d(1);
              s.length = o.length;
            }
          }, d: function(h) {
            (0, e.RMB)(s, h), h && (0, e.ogt)(c);
          } };
        }
        function ns(d) {
          var c, o, s, u = d[10].postData + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("pre"), s = (0, e.fLW)(u), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-value vc-max-height-line"), (0, e.Ljt)(o, "data-scrollable", "1"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o), (0, e.R3I)(o, s);
          }, p: function(h, p) {
            1024 & p && u !== (u = h[10].postData + "") && (0, e.rTO)(s, u);
          }, d: function(h) {
            h && (0, e.ogt)(c);
          } };
        }
        function Lr(d) {
          var c, o, s, u, h, p, v, b = d[11] + "", T = d[4](d[12]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), s = (0, e.fLW)(b), u = (0, e.DhX)(), h = (0, e.bGB)("div"), p = (0, e.fLW)(T), v = (0, e.DhX)(), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(h, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(h, "data-scrollable", "1"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(k, B) {
            (0, e.$Tr)(k, c, B), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(c, u), (0, e.R3I)(c, h), (0, e.R3I)(h, p), (0, e.R3I)(c, v);
          }, p: function(k, B) {
            1024 & B && b !== (b = k[11] + "") && (0, e.rTO)(s, b), 1024 & B && T !== (T = k[4](k[12]) + "") && (0, e.rTO)(p, T);
          }, d: function(k) {
            k && (0, e.ogt)(c);
          } };
        }
        function Sr(d) {
          var c, o, s, u, h, p, v, b;
          p = new xt({ props: { content: d[10].header } });
          for (var T = Object.entries(d[10].header), k = [], B = 0; B < T.length; B += 1)
            k[B] = Rr(pr(d, T, B));
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("dl"), s = (0, e.bGB)("dt"), u = (0, e.fLW)(`Response Headers
                `), h = (0, e.bGB)("i"), (0, e.YCL)(p.$$.fragment), v = (0, e.DhX)();
            for (var M = 0; M < k.length; M += 1)
              k[M].c();
            (0, e.Ljt)(h, "class", "vc-table-row-icon"), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(o, "class", "vc-table-row vc-left-border");
          }, m: function(M, W) {
            (0, e.$Tr)(M, c, W), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(s, u), (0, e.R3I)(s, h), (0, e.yef)(p, h, null), (0, e.R3I)(c, v);
            for (var N = 0; N < k.length; N += 1)
              k[N].m(c, null);
            b = !0;
          }, p: function(M, W) {
            var N = {};
            if (1024 & W && (N.content = M[10].header), p.$set(N), 1040 & W) {
              var z;
              for (T = Object.entries(M[10].header), z = 0; z < T.length; z += 1) {
                var Z = pr(M, T, z);
                k[z] ? k[z].p(Z, W) : (k[z] = Rr(Z), k[z].c(), k[z].m(c, null));
              }
              for (; z < k.length; z += 1)
                k[z].d(1);
              k.length = T.length;
            }
          }, i: function(M) {
            b || ((0, e.Ui)(p.$$.fragment, M), b = !0);
          }, o: function(M) {
            (0, e.etI)(p.$$.fragment, M), b = !1;
          }, d: function(M) {
            M && (0, e.ogt)(c), (0, e.vpE)(p), (0, e.RMB)(k, M);
          } };
        }
        function Rr(d) {
          var c, o, s, u, h, p, v, b = d[11] + "", T = d[4](d[12]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), s = (0, e.fLW)(b), u = (0, e.DhX)(), h = (0, e.bGB)("div"), p = (0, e.fLW)(T), v = (0, e.DhX)(), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(h, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(k, B) {
            (0, e.$Tr)(k, c, B), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(c, u), (0, e.R3I)(c, h), (0, e.R3I)(h, p), (0, e.R3I)(c, v);
          }, p: function(k, B) {
            1024 & B && b !== (b = k[11] + "") && (0, e.rTO)(s, b), 1024 & B && T !== (T = k[4](k[12]) + "") && (0, e.rTO)(p, T);
          }, d: function(k) {
            k && (0, e.ogt)(c);
          } };
        }
        function Cr(d) {
          var c, o, s, u, h, p = d[10].responseSizeText + "";
          return { c: function() {
            c = (0, e.bGB)("div"), (o = (0, e.bGB)("div")).textContent = "Size", s = (0, e.DhX)(), u = (0, e.bGB)("div"), h = (0, e.fLW)(p), (0, e.Ljt)(o, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(u, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(c, "class", "vc-table-row vc-left-border vc-small");
          }, m: function(v, b) {
            (0, e.$Tr)(v, c, b), (0, e.R3I)(c, o), (0, e.R3I)(c, s), (0, e.R3I)(c, u), (0, e.R3I)(u, h);
          }, p: function(v, b) {
            1024 & b && p !== (p = v[10].responseSizeText + "") && (0, e.rTO)(h, p);
          }, d: function(v) {
            v && (0, e.ogt)(c);
          } };
        }
        function is(d) {
          var c, o, s, u, h, p, v, b, T, k, B, M, W, N, z, Z, oe, ue, pe, Ie, Le, ze, qe, Je, Re, Ce, Qe, _t, et, Ke, Me, _e, xe, rt, he, Se, Ne, Te, je, dt, gt, Et, st, Ht, wt, zt, mt, Yt, yt, on, dn, On, Hn, be, Fe, $e, Ue, nt, lt, Zt, qt, Kt, vt, Nt, fn, jt, Ii, eo, ii = d[10].name + "", ri = d[10].method + "", oi = d[10].statusText + "", si = d[10].costTime + "", ai = d[10].url + "", li = d[10].method + "", ci = d[10].requestType + "", ui = d[10].status + "", di = d[10].startTimeText + "", fi = (d[10].response || "") + "";
          function Ms() {
            return d[7](d[10]);
          }
          ue = new xt({ props: { handler: d[3], content: d[10] } });
          var kt = d[10].requestHeader !== null && br(d), It = d[10].getData !== null && Er(d), Dt = d[10].postData !== null && Tr(d), Ot = d[10].header !== null && Sr(d);
          lt = new xt({ props: { content: d[10].response } });
          var Jt = d[10].responseSize > 0 && Cr(d);
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("dl"), s = (0, e.bGB)("dd"), u = (0, e.fLW)(ii), h = (0, e.bGB)("dd"), p = (0, e.fLW)(ri), v = (0, e.bGB)("dd"), b = (0, e.fLW)(oi), T = (0, e.bGB)("dd"), k = (0, e.fLW)(si), B = (0, e.DhX)(), M = (0, e.bGB)("div"), W = (0, e.bGB)("div"), N = (0, e.bGB)("dl"), z = (0, e.bGB)("dt"), Z = (0, e.fLW)(`General
                `), oe = (0, e.bGB)("i"), (0, e.YCL)(ue.$$.fragment), pe = (0, e.DhX)(), Ie = (0, e.bGB)("div"), (Le = (0, e.bGB)("div")).textContent = "URL", ze = (0, e.DhX)(), qe = (0, e.bGB)("div"), Je = (0, e.fLW)(ai), Re = (0, e.DhX)(), Ce = (0, e.bGB)("div"), (Qe = (0, e.bGB)("div")).textContent = "Method", _t = (0, e.DhX)(), et = (0, e.bGB)("div"), Ke = (0, e.fLW)(li), Me = (0, e.DhX)(), _e = (0, e.bGB)("div"), (xe = (0, e.bGB)("div")).textContent = "Request Type", rt = (0, e.DhX)(), he = (0, e.bGB)("div"), Se = (0, e.fLW)(ci), Ne = (0, e.DhX)(), Te = (0, e.bGB)("div"), (je = (0, e.bGB)("div")).textContent = "HTTP Status", dt = (0, e.DhX)(), gt = (0, e.bGB)("div"), Et = (0, e.fLW)(ui), st = (0, e.DhX)(), Ht = (0, e.bGB)("div"), (wt = (0, e.bGB)("div")).textContent = "Start Time", zt = (0, e.DhX)(), mt = (0, e.bGB)("div"), Yt = (0, e.fLW)(di), yt = (0, e.DhX)(), kt && kt.c(), on = (0, e.DhX)(), It && It.c(), dn = (0, e.DhX)(), Dt && Dt.c(), On = (0, e.DhX)(), Ot && Ot.c(), Hn = (0, e.DhX)(), be = (0, e.bGB)("div"), Fe = (0, e.bGB)("dl"), $e = (0, e.bGB)("dt"), Ue = (0, e.fLW)(`Response
                `), nt = (0, e.bGB)("i"), (0, e.YCL)(lt.$$.fragment), Zt = (0, e.DhX)(), Jt && Jt.c(), qt = (0, e.DhX)(), Kt = (0, e.bGB)("div"), vt = (0, e.bGB)("pre"), Nt = (0, e.fLW)(fi), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-4"), (0, e.Ljt)(h, "class", "vc-table-col"), (0, e.Ljt)(v, "class", "vc-table-col"), (0, e.Ljt)(T, "class", "vc-table-col"), (0, e.Ljt)(o, "class", "vc-table-row vc-group-preview"), (0, e.VHj)(o, "vc-table-row-error", d[10].status >= 400), (0, e.Ljt)(oe, "class", "vc-table-row-icon"), (0, e.Ljt)(z, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(N, "class", "vc-table-row vc-left-border"), (0, e.Ljt)(Le, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(qe, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(Ie, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(Qe, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(et, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(Ce, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(xe, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(he, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(_e, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(je, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(gt, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(Te, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(wt, "class", "vc-table-col vc-table-col-2"), (0, e.Ljt)(mt, "class", "vc-table-col vc-table-col-4 vc-table-col-value vc-max-height-line"), (0, e.Ljt)(Ht, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(nt, "class", "vc-table-row-icon"), (0, e.Ljt)($e, "class", "vc-table-col vc-table-col-title"), (0, e.Ljt)(Fe, "class", "vc-table-row vc-left-border"), (0, e.Ljt)(vt, "class", "vc-table-col vc-max-height vc-min-height"), (0, e.Ljt)(vt, "data-scrollable", "1"), (0, e.Ljt)(Kt, "class", "vc-table-row vc-left-border vc-small"), (0, e.Ljt)(M, "class", "vc-group-detail"), (0, e.Ljt)(c, "slot", "item"), (0, e.Ljt)(c, "class", "vc-group"), (0, e.Ljt)(c, "id", fn = d[10].id), (0, e.VHj)(c, "vc-actived", d[10].actived);
          }, m: function(Qt, ct) {
            (0, e.$Tr)(Qt, c, ct), (0, e.R3I)(c, o), (0, e.R3I)(o, s), (0, e.R3I)(s, u), (0, e.R3I)(o, h), (0, e.R3I)(h, p), (0, e.R3I)(o, v), (0, e.R3I)(v, b), (0, e.R3I)(o, T), (0, e.R3I)(T, k), (0, e.R3I)(c, B), (0, e.R3I)(c, M), (0, e.R3I)(M, W), (0, e.R3I)(W, N), (0, e.R3I)(N, z), (0, e.R3I)(z, Z), (0, e.R3I)(z, oe), (0, e.yef)(ue, oe, null), (0, e.R3I)(W, pe), (0, e.R3I)(W, Ie), (0, e.R3I)(Ie, Le), (0, e.R3I)(Ie, ze), (0, e.R3I)(Ie, qe), (0, e.R3I)(qe, Je), (0, e.R3I)(W, Re), (0, e.R3I)(W, Ce), (0, e.R3I)(Ce, Qe), (0, e.R3I)(Ce, _t), (0, e.R3I)(Ce, et), (0, e.R3I)(et, Ke), (0, e.R3I)(W, Me), (0, e.R3I)(W, _e), (0, e.R3I)(_e, xe), (0, e.R3I)(_e, rt), (0, e.R3I)(_e, he), (0, e.R3I)(he, Se), (0, e.R3I)(W, Ne), (0, e.R3I)(W, Te), (0, e.R3I)(Te, je), (0, e.R3I)(Te, dt), (0, e.R3I)(Te, gt), (0, e.R3I)(gt, Et), (0, e.R3I)(W, st), (0, e.R3I)(W, Ht), (0, e.R3I)(Ht, wt), (0, e.R3I)(Ht, zt), (0, e.R3I)(Ht, mt), (0, e.R3I)(mt, Yt), (0, e.R3I)(M, yt), kt && kt.m(M, null), (0, e.R3I)(M, on), It && It.m(M, null), (0, e.R3I)(M, dn), Dt && Dt.m(M, null), (0, e.R3I)(M, On), Ot && Ot.m(M, null), (0, e.R3I)(M, Hn), (0, e.R3I)(M, be), (0, e.R3I)(be, Fe), (0, e.R3I)(Fe, $e), (0, e.R3I)($e, Ue), (0, e.R3I)($e, nt), (0, e.yef)(lt, nt, null), (0, e.R3I)(be, Zt), Jt && Jt.m(be, null), (0, e.R3I)(be, qt), (0, e.R3I)(be, Kt), (0, e.R3I)(Kt, vt), (0, e.R3I)(vt, Nt), jt = !0, Ii || (eo = (0, e.oLt)(o, "click", Ms), Ii = !0);
          }, p: function(Qt, ct) {
            d = Qt, (!jt || 1024 & ct) && ii !== (ii = d[10].name + "") && (0, e.rTO)(u, ii), (!jt || 1024 & ct) && ri !== (ri = d[10].method + "") && (0, e.rTO)(p, ri), (!jt || 1024 & ct) && oi !== (oi = d[10].statusText + "") && (0, e.rTO)(b, oi), (!jt || 1024 & ct) && si !== (si = d[10].costTime + "") && (0, e.rTO)(k, si), 1024 & ct && (0, e.VHj)(o, "vc-table-row-error", d[10].status >= 400);
            var to = {};
            1024 & ct && (to.content = d[10]), ue.$set(to), (!jt || 1024 & ct) && ai !== (ai = d[10].url + "") && (0, e.rTO)(Je, ai), (!jt || 1024 & ct) && li !== (li = d[10].method + "") && (0, e.rTO)(Ke, li), (!jt || 1024 & ct) && ci !== (ci = d[10].requestType + "") && (0, e.rTO)(Se, ci), (!jt || 1024 & ct) && ui !== (ui = d[10].status + "") && (0, e.rTO)(Et, ui), (!jt || 1024 & ct) && di !== (di = d[10].startTimeText + "") && (0, e.rTO)(Yt, di), d[10].requestHeader !== null ? kt ? (kt.p(d, ct), 1024 & ct && (0, e.Ui)(kt, 1)) : ((kt = br(d)).c(), (0, e.Ui)(kt, 1), kt.m(M, on)) : kt && ((0, e.dvw)(), (0, e.etI)(kt, 1, 1, function() {
              kt = null;
            }), (0, e.gbL)()), d[10].getData !== null ? It ? (It.p(d, ct), 1024 & ct && (0, e.Ui)(It, 1)) : ((It = Er(d)).c(), (0, e.Ui)(It, 1), It.m(M, dn)) : It && ((0, e.dvw)(), (0, e.etI)(It, 1, 1, function() {
              It = null;
            }), (0, e.gbL)()), d[10].postData !== null ? Dt ? (Dt.p(d, ct), 1024 & ct && (0, e.Ui)(Dt, 1)) : ((Dt = Tr(d)).c(), (0, e.Ui)(Dt, 1), Dt.m(M, On)) : Dt && ((0, e.dvw)(), (0, e.etI)(Dt, 1, 1, function() {
              Dt = null;
            }), (0, e.gbL)()), d[10].header !== null ? Ot ? (Ot.p(d, ct), 1024 & ct && (0, e.Ui)(Ot, 1)) : ((Ot = Sr(d)).c(), (0, e.Ui)(Ot, 1), Ot.m(M, Hn)) : Ot && ((0, e.dvw)(), (0, e.etI)(Ot, 1, 1, function() {
              Ot = null;
            }), (0, e.gbL)());
            var no = {};
            1024 & ct && (no.content = d[10].response), lt.$set(no), d[10].responseSize > 0 ? Jt ? Jt.p(d, ct) : ((Jt = Cr(d)).c(), Jt.m(be, qt)) : Jt && (Jt.d(1), Jt = null), (!jt || 1024 & ct) && fi !== (fi = (d[10].response || "") + "") && (0, e.rTO)(Nt, fi), (!jt || 1024 & ct && fn !== (fn = d[10].id)) && (0, e.Ljt)(c, "id", fn), 1024 & ct && (0, e.VHj)(c, "vc-actived", d[10].actived);
          }, i: function(Qt) {
            jt || ((0, e.Ui)(ue.$$.fragment, Qt), (0, e.Ui)(kt), (0, e.Ui)(It), (0, e.Ui)(Dt), (0, e.Ui)(Ot), (0, e.Ui)(lt.$$.fragment, Qt), jt = !0);
          }, o: function(Qt) {
            (0, e.etI)(ue.$$.fragment, Qt), (0, e.etI)(kt), (0, e.etI)(It), (0, e.etI)(Dt), (0, e.etI)(Ot), (0, e.etI)(lt.$$.fragment, Qt), jt = !1;
          }, d: function(Qt) {
            Qt && (0, e.ogt)(c), (0, e.vpE)(ue), kt && kt.d(), It && It.d(), Dt && Dt.d(), Ot && Ot.d(), (0, e.vpE)(lt), Jt && Jt.d(), Ii = !1, eo();
          } };
        }
        function rs(d) {
          var c, o, s, u;
          return s = new ir({ props: { items: d[1], itemKey: "id", itemHeight: 30, buffer: 100, stickToBottom: !0, scrollbar: !0, $$slots: { item: [is, function(h) {
            return { 10: h.item };
          }, function(h) {
            return h.item ? 1024 : 0;
          }], empty: [es], header: [Qo] }, $$scope: { ctx: d } } }), { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("div"), (0, e.YCL)(s.$$.fragment), (0, e.Ljt)(o, "class", "vc-plugin-content"), (0, e.Ljt)(c, "class", "vc-table");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p), (0, e.R3I)(c, o), (0, e.yef)(s, o, null), u = !0;
          }, p: function(h, p) {
            var v = p[0], b = {};
            2 & v && (b.items = h[1]), 2098177 & v && (b.$$scope = { dirty: v, ctx: h }), s.$set(b);
          }, i: function(h) {
            u || ((0, e.Ui)(s.$$.fragment, h), u = !0);
          }, o: function(h) {
            (0, e.etI)(s.$$.fragment, h), u = !1;
          }, d: function(h) {
            h && (0, e.ogt)(c), (0, e.vpE)(s);
          } };
        }
        function os(d, c, o) {
          var s;
          (0, e.FIv)(d, vn, function(T) {
            return o(6, s = T);
          });
          var u = 0, h = function(T) {
            o(0, u = Object.keys(T).length);
          }, p = vn.subscribe(h);
          h(s);
          var v = [], b = function(T) {
            (0, e.fxP)(vn, s[T].actived = !s[T].actived, s);
          };
          return (0, g.H3)(function() {
            mr.use();
          }), (0, g.ev)(function() {
            p(), mr.unuse();
          }), d.$$.update = function() {
            64 & d.$$.dirty && o(1, v = Object.values(s));
          }, [u, v, b, function(T) {
            var k = "curl -X " + T.method;
            return typeof T.postData == "string" ? k += " -d '" + T.postData + "'" : typeof T.postData == "object" && T.postData !== null && (k += " -d '" + t.hZ(T.postData) + "'"), k + " '" + T.url + "'";
          }, function(T) {
            return t.Kn(T) || t.kJ(T) ? t.hZ(T, { maxDepth: 10, keyMaxLen: 1e4, pretty: !0 }) : T;
          }, { fixedHeight: !0 }, s, function(T) {
            return b(T.id);
          }];
        }
        var ss = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, os, rs, e.N8, { options: 5 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "options", get: function() {
            return this.$$.ctx[5];
          } }]), c;
        }(e.f_C), as = ss, ls = function(d) {
          function c() {
            for (var s, u = arguments.length, h = new Array(u), p = 0; p < u; p++)
              h[p] = arguments[p];
            return (s = d.call.apply(d, [this].concat(h)) || this).model = Jn.getSingleton(Jn, "VConsoleNetworkModel"), s;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.add = function(s) {
            var u = new dr(new jn());
            for (var h in s)
              u[h] = s[h];
            return u.startTime = u.startTime || Date.now(), u.requestType = u.requestType || "custom", this.model.updateRequest(u.id, u), u;
          }, o.update = function(s, u) {
            this.model.updateRequest(s, u);
          }, o.clear = function() {
            this.model.clearLog();
          }, c;
        }(or), Ar = function(d) {
          function c(s, u, h) {
            var p;
            return h === void 0 && (h = {}), (p = d.call(this, s, u, as, h) || this).model = Jn.getSingleton(Jn, "VConsoleNetworkModel"), p.exporter = void 0, p.exporter = new ls(s), p;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            d.prototype.onReady.call(this), this.onUpdateOption();
          }, o.onAddTool = function(s) {
            var u = this;
            s([{ name: "Clear", global: !1, onClick: function(h) {
              u.model.clearLog();
            } }]);
          }, o.onRemove = function() {
            d.prototype.onRemove.call(this), this.model && this.model.unMock();
          }, o.onUpdateOption = function() {
            var s, u, h;
            ((s = this.vConsole.option.network) == null ? void 0 : s.maxNetworkNumber) !== this.model.maxNetworkNumber && (this.model.maxNetworkNumber = Number((h = this.vConsole.option.network) == null ? void 0 : h.maxNetworkNumber) || 1e3), (u = this.vConsole.option.network) != null && u.ignoreUrlRegExp && (this.model.ignoreUrlRegExp = this.vConsole.option.network.ignoreUrlRegExp);
          }, c;
        }(St), cs = __webpack_require__(8679), us = __webpack_require__.n(cs), ei = (0, Rt.fZ)(), Gn = (0, Rt.fZ)(), ti = __webpack_require__(5670), Wn = {};
        ti.Z && ti.Z.locals && (Wn.locals = ti.Z.locals);
        var Ai, ki = 0, Ln = {};
        Ln.styleTagTransform = O(), Ln.setAttributes = I(), Ln.insert = L().bind(null, "head"), Ln.domAPI = E(), Ln.insertStyleElement = w(), Wn.use = function(d) {
          return Ln.options = d || {}, ki++ || (Ai = y()(ti.Z, Ln)), Wn;
        }, Wn.unuse = function() {
          ki > 0 && !--ki && (Ai(), Ai = null);
        };
        var kr = Wn;
        function Ir(d, c, o) {
          var s = d.slice();
          return s[8] = c[o], s;
        }
        function Dr(d, c, o) {
          var s = d.slice();
          return s[11] = c[o], s;
        }
        function Or(d) {
          var c, o, s, u = d[0].nodeType === Node.ELEMENT_NODE && Pr(d), h = d[0].nodeType === Node.TEXT_NODE && jr(d);
          return { c: function() {
            c = (0, e.bGB)("div"), u && u.c(), o = (0, e.DhX)(), h && h.c(), (0, e.Ljt)(c, "class", "vcelm-l"), (0, e.VHj)(c, "vc-actived", d[0]._isActived), (0, e.VHj)(c, "vc-toggle", d[0]._isExpand), (0, e.VHj)(c, "vcelm-noc", d[0]._isSingleLine);
          }, m: function(p, v) {
            (0, e.$Tr)(p, c, v), u && u.m(c, null), (0, e.R3I)(c, o), h && h.m(c, null), s = !0;
          }, p: function(p, v) {
            p[0].nodeType === Node.ELEMENT_NODE ? u ? (u.p(p, v), 1 & v && (0, e.Ui)(u, 1)) : ((u = Pr(p)).c(), (0, e.Ui)(u, 1), u.m(c, o)) : u && ((0, e.dvw)(), (0, e.etI)(u, 1, 1, function() {
              u = null;
            }), (0, e.gbL)()), p[0].nodeType === Node.TEXT_NODE ? h ? h.p(p, v) : ((h = jr(p)).c(), h.m(c, null)) : h && (h.d(1), h = null), 1 & v && (0, e.VHj)(c, "vc-actived", p[0]._isActived), 1 & v && (0, e.VHj)(c, "vc-toggle", p[0]._isExpand), 1 & v && (0, e.VHj)(c, "vcelm-noc", p[0]._isSingleLine);
          }, i: function(p) {
            s || ((0, e.Ui)(u), s = !0);
          }, o: function(p) {
            (0, e.etI)(u), s = !1;
          }, d: function(p) {
            p && (0, e.ogt)(c), u && u.d(), h && h.d();
          } };
        }
        function Pr(d) {
          var c, o, s, u, h, p, v, b, T, k, B = d[0].nodeName + "", M = (d[0].className || d[0].attributes.length) && Mr(d), W = d[0]._isNullEndTag && Br(), N = d[0].childNodes.length > 0 && Fr(d), z = !d[0]._isNullEndTag && Nr(d);
          return { c: function() {
            c = (0, e.bGB)("span"), o = (0, e.fLW)("<"), s = (0, e.fLW)(B), M && M.c(), u = (0, e.cSb)(), W && W.c(), h = (0, e.fLW)(">"), N && N.c(), p = (0, e.cSb)(), z && z.c(), v = (0, e.cSb)(), (0, e.Ljt)(c, "class", "vcelm-node");
          }, m: function(Z, oe) {
            (0, e.$Tr)(Z, c, oe), (0, e.R3I)(c, o), (0, e.R3I)(c, s), M && M.m(c, null), (0, e.R3I)(c, u), W && W.m(c, null), (0, e.R3I)(c, h), N && N.m(Z, oe), (0, e.$Tr)(Z, p, oe), z && z.m(Z, oe), (0, e.$Tr)(Z, v, oe), b = !0, T || (k = (0, e.oLt)(c, "click", d[2]), T = !0);
          }, p: function(Z, oe) {
            (!b || 1 & oe) && B !== (B = Z[0].nodeName + "") && (0, e.rTO)(s, B), Z[0].className || Z[0].attributes.length ? M ? M.p(Z, oe) : ((M = Mr(Z)).c(), M.m(c, u)) : M && (M.d(1), M = null), Z[0]._isNullEndTag ? W || ((W = Br()).c(), W.m(c, h)) : W && (W.d(1), W = null), Z[0].childNodes.length > 0 ? N ? (N.p(Z, oe), 1 & oe && (0, e.Ui)(N, 1)) : ((N = Fr(Z)).c(), (0, e.Ui)(N, 1), N.m(p.parentNode, p)) : N && ((0, e.dvw)(), (0, e.etI)(N, 1, 1, function() {
              N = null;
            }), (0, e.gbL)()), Z[0]._isNullEndTag ? z && (z.d(1), z = null) : z ? z.p(Z, oe) : ((z = Nr(Z)).c(), z.m(v.parentNode, v));
          }, i: function(Z) {
            b || ((0, e.Ui)(N), b = !0);
          }, o: function(Z) {
            (0, e.etI)(N), b = !1;
          }, d: function(Z) {
            Z && (0, e.ogt)(c), M && M.d(), W && W.d(), N && N.d(Z), Z && (0, e.ogt)(p), z && z.d(Z), Z && (0, e.ogt)(v), T = !1, k();
          } };
        }
        function Mr(d) {
          for (var c, o = d[0].attributes, s = [], u = 0; u < o.length; u += 1)
            s[u] = $r(Dr(d, o, u));
          return { c: function() {
            c = (0, e.bGB)("i");
            for (var h = 0; h < s.length; h += 1)
              s[h].c();
            (0, e.Ljt)(c, "class", "vcelm-k");
          }, m: function(h, p) {
            (0, e.$Tr)(h, c, p);
            for (var v = 0; v < s.length; v += 1)
              s[v].m(c, null);
          }, p: function(h, p) {
            if (1 & p) {
              var v;
              for (o = h[0].attributes, v = 0; v < o.length; v += 1) {
                var b = Dr(h, o, v);
                s[v] ? s[v].p(b, p) : (s[v] = $r(b), s[v].c(), s[v].m(c, null));
              }
              for (; v < s.length; v += 1)
                s[v].d(1);
              s.length = o.length;
            }
          }, d: function(h) {
            h && (0, e.ogt)(c), (0, e.RMB)(s, h);
          } };
        }
        function ds(d) {
          var c, o = d[11].name + "";
          return { c: function() {
            c = (0, e.fLW)(o);
          }, m: function(s, u) {
            (0, e.$Tr)(s, c, u);
          }, p: function(s, u) {
            1 & u && o !== (o = s[11].name + "") && (0, e.rTO)(c, o);
          }, d: function(s) {
            s && (0, e.ogt)(c);
          } };
        }
        function fs(d) {
          var c, o, s, u, h, p = d[11].name + "", v = d[11].value + "";
          return { c: function() {
            c = (0, e.fLW)(p), o = (0, e.fLW)('="'), s = (0, e.bGB)("i"), u = (0, e.fLW)(v), h = (0, e.fLW)('"'), (0, e.Ljt)(s, "class", "vcelm-v");
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.$Tr)(b, o, T), (0, e.$Tr)(b, s, T), (0, e.R3I)(s, u), (0, e.$Tr)(b, h, T);
          }, p: function(b, T) {
            1 & T && p !== (p = b[11].name + "") && (0, e.rTO)(c, p), 1 & T && v !== (v = b[11].value + "") && (0, e.rTO)(u, v);
          }, d: function(b) {
            b && (0, e.ogt)(c), b && (0, e.ogt)(o), b && (0, e.ogt)(s), b && (0, e.ogt)(h);
          } };
        }
        function $r(d) {
          var c, o;
          function s(p, v) {
            return p[11].value !== "" ? fs : ds;
          }
          var u = s(d), h = u(d);
          return { c: function() {
            c = (0, e.fLW)(` 
            `), h.c(), o = (0, e.cSb)();
          }, m: function(p, v) {
            (0, e.$Tr)(p, c, v), h.m(p, v), (0, e.$Tr)(p, o, v);
          }, p: function(p, v) {
            u === (u = s(p)) && h ? h.p(p, v) : (h.d(1), (h = u(p)) && (h.c(), h.m(o.parentNode, o)));
          }, d: function(p) {
            p && (0, e.ogt)(c), h.d(p), p && (0, e.ogt)(o);
          } };
        }
        function Br(d) {
          var c;
          return { c: function() {
            c = (0, e.fLW)("/");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function Fr(d) {
          var c, o, s, u, h = [ms, hs], p = [];
          function v(b, T) {
            return b[0]._isExpand ? 1 : 0;
          }
          return c = v(d), o = p[c] = h[c](d), { c: function() {
            o.c(), s = (0, e.cSb)();
          }, m: function(b, T) {
            p[c].m(b, T), (0, e.$Tr)(b, s, T), u = !0;
          }, p: function(b, T) {
            var k = c;
            (c = v(b)) === k ? p[c].p(b, T) : ((0, e.dvw)(), (0, e.etI)(p[k], 1, 1, function() {
              p[k] = null;
            }), (0, e.gbL)(), (o = p[c]) ? o.p(b, T) : (o = p[c] = h[c](b)).c(), (0, e.Ui)(o, 1), o.m(s.parentNode, s));
          }, i: function(b) {
            u || ((0, e.Ui)(o), u = !0);
          }, o: function(b) {
            (0, e.etI)(o), u = !1;
          }, d: function(b) {
            p[c].d(b), b && (0, e.ogt)(s);
          } };
        }
        function hs(d) {
          for (var c, o, s = d[0].childNodes, u = [], h = 0; h < s.length; h += 1)
            u[h] = Ur(Ir(d, s, h));
          var p = function(v) {
            return (0, e.etI)(u[v], 1, 1, function() {
              u[v] = null;
            });
          };
          return { c: function() {
            for (var v = 0; v < u.length; v += 1)
              u[v].c();
            c = (0, e.cSb)();
          }, m: function(v, b) {
            for (var T = 0; T < u.length; T += 1)
              u[T].m(v, b);
            (0, e.$Tr)(v, c, b), o = !0;
          }, p: function(v, b) {
            if (1 & b) {
              var T;
              for (s = v[0].childNodes, T = 0; T < s.length; T += 1) {
                var k = Ir(v, s, T);
                u[T] ? (u[T].p(k, b), (0, e.Ui)(u[T], 1)) : (u[T] = Ur(k), u[T].c(), (0, e.Ui)(u[T], 1), u[T].m(c.parentNode, c));
              }
              for ((0, e.dvw)(), T = s.length; T < u.length; T += 1)
                p(T);
              (0, e.gbL)();
            }
          }, i: function(v) {
            if (!o) {
              for (var b = 0; b < s.length; b += 1)
                (0, e.Ui)(u[b]);
              o = !0;
            }
          }, o: function(v) {
            u = u.filter(Boolean);
            for (var b = 0; b < u.length; b += 1)
              (0, e.etI)(u[b]);
            o = !1;
          }, d: function(v) {
            (0, e.RMB)(u, v), v && (0, e.ogt)(c);
          } };
        }
        function ms(d) {
          var c;
          return { c: function() {
            c = (0, e.fLW)("...");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, p: e.ZTd, i: e.ZTd, o: e.ZTd, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function Ur(d) {
          var c, o, s;
          return (c = new Vr({ props: { node: d[8] } })).$on("toggleNode", d[4]), { c: function() {
            (0, e.YCL)(c.$$.fragment), o = (0, e.DhX)();
          }, m: function(u, h) {
            (0, e.yef)(c, u, h), (0, e.$Tr)(u, o, h), s = !0;
          }, p: function(u, h) {
            var p = {};
            1 & h && (p.node = u[8]), c.$set(p);
          }, i: function(u) {
            s || ((0, e.Ui)(c.$$.fragment, u), s = !0);
          }, o: function(u) {
            (0, e.etI)(c.$$.fragment, u), s = !1;
          }, d: function(u) {
            (0, e.vpE)(c, u), u && (0, e.ogt)(o);
          } };
        }
        function Nr(d) {
          var c, o, s, u, h = d[0].nodeName + "";
          return { c: function() {
            c = (0, e.bGB)("span"), o = (0, e.fLW)("</"), s = (0, e.fLW)(h), u = (0, e.fLW)(">"), (0, e.Ljt)(c, "class", "vcelm-node");
          }, m: function(p, v) {
            (0, e.$Tr)(p, c, v), (0, e.R3I)(c, o), (0, e.R3I)(c, s), (0, e.R3I)(c, u);
          }, p: function(p, v) {
            1 & v && h !== (h = p[0].nodeName + "") && (0, e.rTO)(s, h);
          }, d: function(p) {
            p && (0, e.ogt)(c);
          } };
        }
        function jr(d) {
          var c, o, s = d[1](d[0].textContent) + "";
          return { c: function() {
            c = (0, e.bGB)("span"), o = (0, e.fLW)(s), (0, e.Ljt)(c, "class", "vcelm-t vcelm-noc");
          }, m: function(u, h) {
            (0, e.$Tr)(u, c, h), (0, e.R3I)(c, o);
          }, p: function(u, h) {
            1 & h && s !== (s = u[1](u[0].textContent) + "") && (0, e.rTO)(o, s);
          }, d: function(u) {
            u && (0, e.ogt)(c);
          } };
        }
        function ps(d) {
          var c, o, s = d[0] && Or(d);
          return { c: function() {
            s && s.c(), c = (0, e.cSb)();
          }, m: function(u, h) {
            s && s.m(u, h), (0, e.$Tr)(u, c, h), o = !0;
          }, p: function(u, h) {
            var p = h[0];
            u[0] ? s ? (s.p(u, p), 1 & p && (0, e.Ui)(s, 1)) : ((s = Or(u)).c(), (0, e.Ui)(s, 1), s.m(c.parentNode, c)) : s && ((0, e.dvw)(), (0, e.etI)(s, 1, 1, function() {
              s = null;
            }), (0, e.gbL)());
          }, i: function(u) {
            o || ((0, e.Ui)(s), o = !0);
          }, o: function(u) {
            (0, e.etI)(s), o = !1;
          }, d: function(u) {
            s && s.d(u), u && (0, e.ogt)(c);
          } };
        }
        function gs(d, c, o) {
          var s;
          (0, e.FIv)(d, Gn, function(v) {
            return o(3, s = v);
          });
          var u = c.node, h = (0, g.x)(), p = ["br", "hr", "img", "input", "link", "meta"];
          return (0, g.H3)(function() {
            kr.use();
          }), (0, g.ev)(function() {
            kr.unuse();
          }), d.$$set = function(v) {
            "node" in v && o(0, u = v.node);
          }, d.$$.update = function() {
            9 & d.$$.dirty && u && (o(0, u._isActived = u === s, u), o(0, u._isNullEndTag = function(v) {
              return p.indexOf(v.nodeName) > -1;
            }(u), u), o(0, u._isSingleLine = u.childNodes.length === 0 || u._isNullEndTag, u));
          }, [u, function(v) {
            return v.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
          }, function() {
            u._isNullEndTag || (o(0, u._isExpand = !u._isExpand, u), h("toggleNode", { node: u }));
          }, s, function(v) {
            e.cKT.call(this, d, v);
          }];
        }
        var Vr = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, gs, ps, e.N8, { node: 0 }), s;
          }
          return (0, a.Z)(c, d), (0, f.Z)(c, [{ key: "node", get: function() {
            return this.$$.ctx[0];
          }, set: function(o) {
            this.$$set({ node: o }), (0, e.yl1)();
          } }]), c;
        }(e.f_C), vs = Vr;
        function _s(d) {
          var c, o, s;
          return (o = new vs({ props: { node: d[0] } })).$on("toggleNode", d[1]), { c: function() {
            c = (0, e.bGB)("div"), (0, e.YCL)(o.$$.fragment), (0, e.Ljt)(c, "class", "vc-plugin-content");
          }, m: function(u, h) {
            (0, e.$Tr)(u, c, h), (0, e.yef)(o, c, null), s = !0;
          }, p: function(u, h) {
            var p = {};
            1 & h[0] && (p.node = u[0]), o.$set(p);
          }, i: function(u) {
            s || ((0, e.Ui)(o.$$.fragment, u), s = !0);
          }, o: function(u) {
            (0, e.etI)(o.$$.fragment, u), s = !1;
          }, d: function(u) {
            u && (0, e.ogt)(c), (0, e.vpE)(o);
          } };
        }
        function ys(d, c, o) {
          var s;
          return (0, e.FIv)(d, ei, function(u) {
            return o(0, s = u);
          }), [s, function(u) {
            e.cKT.call(this, d, u);
          }];
        }
        var bs = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, ys, _s, e.N8, {}), s;
          }
          return (0, a.Z)(c, d), c;
        }(e.f_C), xs = bs, Gr = function(d) {
          function c(s, u, h) {
            var p;
            return h === void 0 && (h = {}), (p = d.call(this, s, u, xs, h) || this).isInited = !1, p.observer = void 0, p.nodeMap = void 0, p;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onShow = function() {
            this.isInited || this._init();
          }, o.onRemove = function() {
            d.prototype.onRemove.call(this), this.isInited && (this.observer.disconnect(), this.isInited = !1, this.nodeMap = void 0, ei.set(void 0));
          }, o.onAddTool = function(s) {
            var u = this;
            s([{ name: "Expand", global: !1, onClick: function(h) {
              u._expandActivedNode();
            } }, { name: "Collapse", global: !1, onClick: function(h) {
              u._collapseActivedNode();
            } }]);
          }, o._init = function() {
            var s = this;
            this.isInited = !0, this.nodeMap = /* @__PURE__ */ new WeakMap();
            var u = this._generateVNode(document.documentElement);
            u._isExpand = !0, Gn.set(u), ei.set(u), this.compInstance.$on("toggleNode", function(h) {
              Gn.set(h.detail.node);
            }), this.observer = new (us())(function(h) {
              for (var p = 0; p < h.length; p++) {
                var v = h[p];
                s._isInVConsole(v.target) || s._handleMutation(v);
              }
            }), this.observer.observe(document.documentElement, { attributes: !0, childList: !0, characterData: !0, subtree: !0 });
          }, o._handleMutation = function(s) {
            switch (s.type) {
              case "childList":
                s.removedNodes.length > 0 && this._onChildRemove(s), s.addedNodes.length > 0 && this._onChildAdd(s);
                break;
              case "attributes":
                this._onAttributesChange(s);
                break;
              case "characterData":
                this._onCharacterDataChange(s);
            }
          }, o._onChildRemove = function(s) {
            var u = this.nodeMap.get(s.target);
            if (u) {
              for (var h = 0; h < s.removedNodes.length; h++) {
                var p = this.nodeMap.get(s.removedNodes[h]);
                if (p) {
                  for (var v = 0; v < u.childNodes.length; v++)
                    if (u.childNodes[v] === p) {
                      u.childNodes.splice(v, 1);
                      break;
                    }
                  this.nodeMap.delete(s.removedNodes[h]);
                }
              }
              this._refreshStore();
            }
          }, o._onChildAdd = function(s) {
            var u = this.nodeMap.get(s.target);
            if (u) {
              for (var h = 0; h < s.addedNodes.length; h++) {
                var p = s.addedNodes[h], v = this._generateVNode(p);
                if (v) {
                  var b = void 0, T = p;
                  do {
                    if (T.nextSibling === null)
                      break;
                    T.nodeType === Node.ELEMENT_NODE && (b = this.nodeMap.get(T.nextSibling) || void 0), T = T.nextSibling;
                  } while (b === void 0);
                  if (b === void 0)
                    u.childNodes.push(v);
                  else
                    for (var k = 0; k < u.childNodes.length; k++)
                      if (u.childNodes[k] === b) {
                        u.childNodes.splice(k, 0, v);
                        break;
                      }
                }
              }
              this._refreshStore();
            }
          }, o._onAttributesChange = function(s) {
            this._updateVNodeAttributes(s.target), this._refreshStore();
          }, o._onCharacterDataChange = function(s) {
            var u = this.nodeMap.get(s.target);
            u && (u.textContent = s.target.textContent, this._refreshStore());
          }, o._generateVNode = function(s) {
            if (!this._isIgnoredNode(s)) {
              var u = { nodeType: s.nodeType, nodeName: s.nodeName.toLowerCase(), textContent: "", id: "", className: "", attributes: [], childNodes: [] };
              if (this.nodeMap.set(s, u), u.nodeType != s.TEXT_NODE && u.nodeType != s.DOCUMENT_TYPE_NODE || (u.textContent = s.textContent), s.childNodes.length > 0) {
                u.childNodes = [];
                for (var h = 0; h < s.childNodes.length; h++) {
                  var p = this._generateVNode(s.childNodes[h]);
                  p && u.childNodes.push(p);
                }
              }
              return this._updateVNodeAttributes(s), u;
            }
          }, o._updateVNodeAttributes = function(s) {
            var u = this.nodeMap.get(s);
            if (u && s instanceof Element && (u.id = s.id || "", u.className = s.className || "", s.hasAttributes && s.hasAttributes())) {
              u.attributes = [];
              for (var h = 0; h < s.attributes.length; h++)
                u.attributes.push({ name: s.attributes[h].name, value: s.attributes[h].value || "" });
            }
          }, o._expandActivedNode = function() {
            var s = (0, Rt.U2)(Gn);
            if (s._isExpand)
              for (var u = 0; u < s.childNodes.length; u++)
                s.childNodes[u]._isExpand = !0;
            else
              s._isExpand = !0;
            this._refreshStore();
          }, o._collapseActivedNode = function() {
            var s = (0, Rt.U2)(Gn);
            if (s._isExpand) {
              for (var u = !1, h = 0; h < s.childNodes.length; h++)
                s.childNodes[h]._isExpand && (u = !0, s.childNodes[h]._isExpand = !1);
              u || (s._isExpand = !1), this._refreshStore();
            }
          }, o._isIgnoredNode = function(s) {
            if (s.nodeType === s.TEXT_NODE) {
              if (s.textContent.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$|\n+/g, "") === "")
                return !0;
            } else if (s.nodeType === s.COMMENT_NODE)
              return !0;
            return !1;
          }, o._isInVConsole = function(s) {
            for (var u = s; u !== void 0; ) {
              if (u.id == "__vconsole")
                return !0;
              u = u.parentElement || void 0;
            }
            return !1;
          }, o._refreshStore = function() {
            ei.update(function(s) {
              return s;
            });
          }, c;
        }(St);
        function Wr(d, c, o, s, u, h, p) {
          try {
            var v = d[h](p), b = v.value;
          } catch (T) {
            return void o(T);
          }
          v.done ? c(b) : Promise.resolve(b).then(s, u);
        }
        function Dn(d) {
          return function() {
            var c = this, o = arguments;
            return new Promise(function(s, u) {
              var h = d.apply(c, o);
              function p(b) {
                Wr(h, s, u, p, v, "next", b);
              }
              function v(b) {
                Wr(h, s, u, p, v, "throw", b);
              }
              p(void 0);
            });
          };
        }
        var Es = __webpack_require__(8270);
        function Hr(d, c) {
          var o = Object.keys(d);
          if (Object.getOwnPropertySymbols) {
            var s = Object.getOwnPropertySymbols(d);
            c && (s = s.filter(function(u) {
              return Object.getOwnPropertyDescriptor(d, u).enumerable;
            })), o.push.apply(o, s);
          }
          return o;
        }
        function zr(d) {
          for (var c = 1; c < arguments.length; c++) {
            var o = arguments[c] != null ? arguments[c] : {};
            c % 2 ? Hr(Object(o), !0).forEach(function(s) {
              (0, Es.Z)(d, s, o[s]);
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(d, Object.getOwnPropertyDescriptors(o)) : Hr(Object(o)).forEach(function(s) {
              Object.defineProperty(d, s, Object.getOwnPropertyDescriptor(o, s));
            });
          }
          return d;
        }
        var qr = function(d) {
          if (!d || d.length === 0)
            return {};
          for (var c = {}, o = d.split(";"), s = 0; s < o.length; s++) {
            var u = o[s].indexOf("=");
            if (!(u < 0)) {
              var h = o[s].substring(0, u).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""), p = o[s].substring(u + 1, o[s].length);
              try {
                h = decodeURIComponent(h);
              } catch {
              }
              try {
                p = decodeURIComponent(p);
              } catch {
              }
              c[h] = p;
            }
          }
          return c;
        }, Kr = function(d, c, o) {
          typeof document < "u" && document.cookie !== void 0 && (document.cookie = encodeURIComponent(d) + "=" + encodeURIComponent(c) + function(s) {
            s === void 0 && (s = {});
            var u = s, h = u.path, p = u.domain, v = u.expires, b = u.secure, T = u.sameSite, k = ["none", "lax", "strict"].indexOf((T || "").toLowerCase()) > -1 ? T : null;
            return [h == null ? "" : ";path=" + h, p == null ? "" : ";domain=" + p, v == null ? "" : ";expires=" + v.toUTCString(), b === void 0 || b === !1 ? "" : ";secure", k === null ? "" : ";SameSite=" + k].join("");
          }(o));
        }, Xr = function() {
          return typeof document > "u" || document.cookie === void 0 ? "" : document.cookie;
        }, Ts = function() {
          function d() {
          }
          var c = d.prototype;
          return c.key = function(o) {
            return o < this.keys.length ? this.keys[o] : null;
          }, c.setItem = function(o, s, u) {
            Kr(o, s, u);
          }, c.getItem = function(o) {
            var s = qr(Xr());
            return Object.prototype.hasOwnProperty.call(s, o) ? s[o] : null;
          }, c.removeItem = function(o, s) {
            for (var u, h, p = ["", "/"], v = ((u = location) == null || (h = u.hostname) == null ? void 0 : h.split(".")) || []; v.length > 1; )
              p.push(v.join(".")), v.shift();
            for (var b = 0; b < p.length; b++)
              for (var T, k, B = ((T = location) == null || (k = T.pathname) == null ? void 0 : k.split("/")) || [], M = ""; B.length > 0; ) {
                M += (M === "/" ? "" : "/") + B.shift();
                var W = zr(zr({}, s), {}, { path: M, domain: p[b], expires: /* @__PURE__ */ new Date(0) });
                Kr(o, "", W);
              }
          }, c.clear = function() {
            for (var o = [].concat(this.keys), s = 0; s < o.length; s++)
              this.removeItem(o[s]);
          }, (0, f.Z)(d, [{ key: "length", get: function() {
            return this.keys.length;
          } }, { key: "keys", get: function() {
            var o = qr(Xr());
            return Object.keys(o).sort();
          } }]), d;
        }(), Ls = function() {
          function d() {
            this.keys = [], this.currentSize = 0, this.limitSize = 0;
          }
          var c = d.prototype;
          return c.key = function(o) {
            return o < this.keys.length ? this.keys[o] : null;
          }, c.prepare = function() {
            var o = Dn(at().mark(function s() {
              var u = this;
              return at().wrap(function(h) {
                for (; ; )
                  switch (h.prev = h.next) {
                    case 0:
                      return h.abrupt("return", new Promise(function(p, v) {
                        (0, t.qt)("getStorageInfo", { success: function(b) {
                          u.keys = b ? b.keys.sort() : [], u.currentSize = b ? b.currentSize : 0, u.limitSize = b ? b.limitSize : 0, p(!0);
                        }, fail: function() {
                          v(!1);
                        } });
                      }));
                    case 1:
                    case "end":
                      return h.stop();
                  }
              }, s);
            }));
            return function() {
              return o.apply(this, arguments);
            };
          }(), c.getItem = function(o) {
            return new Promise(function(s, u) {
              (0, t.qt)("getStorage", { key: o, success: function(h) {
                var p = h.data;
                if (typeof h.data == "object")
                  try {
                    p = JSON.stringify(h.data);
                  } catch {
                  }
                s(p);
              }, fail: function(h) {
                u(h);
              } });
            });
          }, c.setItem = function(o, s) {
            return new Promise(function(u, h) {
              (0, t.qt)("setStorage", { key: o, data: s, success: function(p) {
                u(p);
              }, fail: function(p) {
                h(p);
              } });
            });
          }, c.removeItem = function(o) {
            return new Promise(function(s, u) {
              (0, t.qt)("removeStorage", { key: o, success: function(h) {
                s(h);
              }, fail: function(h) {
                u(h);
              } });
            });
          }, c.clear = function() {
            return new Promise(function(o, s) {
              (0, t.qt)("clearStorage", { success: function(u) {
                o(u);
              }, fail: function(u) {
                s(u);
              } });
            });
          }, (0, f.Z)(d, [{ key: "length", get: function() {
            return this.keys.length;
          } }]), d;
        }(), At = { updateTime: (0, Rt.fZ)(0), activedName: (0, Rt.fZ)(null), defaultStorages: (0, Rt.fZ)(["cookies", "localStorage", "sessionStorage"]) }, ni = function(d) {
          function c() {
            var s;
            return (s = d.call(this) || this).storage = /* @__PURE__ */ new Map(), At.activedName.subscribe(function(u) {
              var h = (0, Rt.U2)(At.defaultStorages);
              h.length > 0 && h.indexOf(u) === -1 && At.activedName.set(h[0]);
            }), At.defaultStorages.subscribe(function(u) {
              u.indexOf((0, Rt.U2)(At.activedName)) === -1 && At.activedName.set(u[0]), s.updateEnabledStorages();
            }), s;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.getItem = function() {
            var s = Dn(at().mark(function u(h) {
              return at().wrap(function(p) {
                for (; ; )
                  switch (p.prev = p.next) {
                    case 0:
                      if (this.activedStorage) {
                        p.next = 2;
                        break;
                      }
                      return p.abrupt("return", "");
                    case 2:
                      return p.next = 4, this.promisify(this.activedStorage.getItem(h));
                    case 4:
                      return p.abrupt("return", p.sent);
                    case 5:
                    case "end":
                      return p.stop();
                  }
              }, u, this);
            }));
            return function(u) {
              return s.apply(this, arguments);
            };
          }(), o.setItem = function() {
            var s = Dn(at().mark(function u(h, p) {
              var v;
              return at().wrap(function(b) {
                for (; ; )
                  switch (b.prev = b.next) {
                    case 0:
                      if (this.activedStorage) {
                        b.next = 2;
                        break;
                      }
                      return b.abrupt("return");
                    case 2:
                      return b.next = 4, this.promisify(this.activedStorage.setItem(h, p));
                    case 4:
                      return v = b.sent, this.refresh(), b.abrupt("return", v);
                    case 7:
                    case "end":
                      return b.stop();
                  }
              }, u, this);
            }));
            return function(u, h) {
              return s.apply(this, arguments);
            };
          }(), o.removeItem = function() {
            var s = Dn(at().mark(function u(h) {
              var p;
              return at().wrap(function(v) {
                for (; ; )
                  switch (v.prev = v.next) {
                    case 0:
                      if (this.activedStorage) {
                        v.next = 2;
                        break;
                      }
                      return v.abrupt("return");
                    case 2:
                      return v.next = 4, this.promisify(this.activedStorage.removeItem(h));
                    case 4:
                      return p = v.sent, this.refresh(), v.abrupt("return", p);
                    case 7:
                    case "end":
                      return v.stop();
                  }
              }, u, this);
            }));
            return function(u) {
              return s.apply(this, arguments);
            };
          }(), o.clear = function() {
            var s = Dn(at().mark(function u() {
              var h;
              return at().wrap(function(p) {
                for (; ; )
                  switch (p.prev = p.next) {
                    case 0:
                      if (this.activedStorage) {
                        p.next = 2;
                        break;
                      }
                      return p.abrupt("return");
                    case 2:
                      return p.next = 4, this.promisify(this.activedStorage.clear());
                    case 4:
                      return h = p.sent, this.refresh(), p.abrupt("return", h);
                    case 7:
                    case "end":
                      return p.stop();
                  }
              }, u, this);
            }));
            return function() {
              return s.apply(this, arguments);
            };
          }(), o.refresh = function() {
            At.updateTime.set(Date.now());
          }, o.getEntries = function() {
            var s = Dn(at().mark(function u() {
              var h, p, v, b, T;
              return at().wrap(function(k) {
                for (; ; )
                  switch (k.prev = k.next) {
                    case 0:
                      if (h = this.activedStorage) {
                        k.next = 3;
                        break;
                      }
                      return k.abrupt("return", []);
                    case 3:
                      if (typeof h.prepare != "function") {
                        k.next = 6;
                        break;
                      }
                      return k.next = 6, h.prepare();
                    case 6:
                      p = [], v = 0;
                    case 8:
                      if (!(v < h.length)) {
                        k.next = 17;
                        break;
                      }
                      return b = h.key(v), k.next = 12, this.getItem(b);
                    case 12:
                      T = k.sent, p.push([b, T]);
                    case 14:
                      v++, k.next = 8;
                      break;
                    case 17:
                      return k.abrupt("return", p);
                    case 18:
                    case "end":
                      return k.stop();
                  }
              }, u, this);
            }));
            return function() {
              return s.apply(this, arguments);
            };
          }(), o.updateEnabledStorages = function() {
            var s = (0, Rt.U2)(At.defaultStorages);
            s.indexOf("cookies") > -1 ? document.cookie !== void 0 && this.storage.set("cookies", new Ts()) : this.deleteStorage("cookies"), s.indexOf("localStorage") > -1 ? window.localStorage && this.storage.set("localStorage", window.localStorage) : this.deleteStorage("localStorage"), s.indexOf("sessionStorage") > -1 ? window.sessionStorage && this.storage.set("sessionStorage", window.sessionStorage) : this.deleteStorage("sessionStorage"), s.indexOf("wxStorage") > -1 ? (0, t.H_)() && this.storage.set("wxStorage", new Ls()) : this.deleteStorage("wxStorage");
          }, o.promisify = function(s) {
            return typeof s == "string" || s == null ? Promise.resolve(s) : s;
          }, o.deleteStorage = function(s) {
            this.storage.has(s) && this.storage.delete(s);
          }, (0, f.Z)(c, [{ key: "activedStorage", get: function() {
            return this.storage.get((0, Rt.U2)(At.activedName));
          } }]), c;
        }(lr.N);
        function Yr(d, c, o) {
          var s = d.slice();
          return s[20] = c[o][0], s[21] = c[o][1], s[23] = o, s;
        }
        function Zr(d) {
          var c;
          return { c: function() {
            (c = (0, e.bGB)("div")).textContent = "Empty", (0, e.Ljt)(c, "class", "vc-plugin-empty");
          }, m: function(o, s) {
            (0, e.$Tr)(o, c, s);
          }, p: e.ZTd, d: function(o) {
            o && (0, e.ogt)(c);
          } };
        }
        function Ss(d) {
          var c, o, s, u, h, p = d[20] + "", v = d[5](d[21]) + "";
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.fLW)(p), s = (0, e.DhX)(), u = (0, e.bGB)("div"), h = (0, e.fLW)(v), (0, e.Ljt)(c, "class", "vc-table-col"), (0, e.Ljt)(u, "class", "vc-table-col vc-table-col-2");
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), (0, e.$Tr)(b, s, T), (0, e.$Tr)(b, u, T), (0, e.R3I)(u, h);
          }, p: function(b, T) {
            1 & T && p !== (p = b[20] + "") && (0, e.rTO)(o, p), 1 & T && v !== (v = b[5](b[21]) + "") && (0, e.rTO)(h, v);
          }, d: function(b) {
            b && (0, e.ogt)(c), b && (0, e.ogt)(s), b && (0, e.ogt)(u);
          } };
        }
        function Rs(d) {
          var c, o, s, u, h, p, v;
          return { c: function() {
            c = (0, e.bGB)("div"), o = (0, e.bGB)("textarea"), s = (0, e.DhX)(), u = (0, e.bGB)("div"), h = (0, e.bGB)("textarea"), (0, e.Ljt)(o, "class", "vc-table-input"), (0, e.Ljt)(c, "class", "vc-table-col"), (0, e.Ljt)(h, "class", "vc-table-input"), (0, e.Ljt)(u, "class", "vc-table-col vc-table-col-2");
          }, m: function(b, T) {
            (0, e.$Tr)(b, c, T), (0, e.R3I)(c, o), (0, e.BmG)(o, d[2]), (0, e.$Tr)(b, s, T), (0, e.$Tr)(b, u, T), (0, e.R3I)(u, h), (0, e.BmG)(h, d[3]), p || (v = [(0, e.oLt)(o, "input", d[11]), (0, e.oLt)(h, "input", d[12])], p = !0);
          }, p: function(b, T) {
            4 & T && (0, e.BmG)(o, b[2]), 8 & T && (0, e.BmG)(h, b[3]);
          }, d: function(b) {
            b && (0, e.ogt)(c), b && (0, e.ogt)(s), b && (0, e.ogt)(u), p = !1, (0, e.j7q)(v);
          } };
        }
        function Cs(d) {
          var c, o, s, u, h, p;
          return (c = new bt.Z({ props: { name: "delete" } })).$on("click", function() {
            return d[14](d[20]);
          }), s = new xt({ props: { content: [d[20], d[21]].join("=") } }), (h = new bt.Z({ props: { name: "edit" } })).$on("click", function() {
            return d[15](d[20], d[21], d[23]);
          }), { c: function() {
            (0, e.YCL)(c.$$.fragment), o = (0, e.DhX)(), (0, e.YCL)(s.$$.fragment), u = (0, e.DhX)(), (0, e.YCL)(h.$$.fragment);
          }, m: function(v, b) {
            (0, e.yef)(c, v, b), (0, e.$Tr)(v, o, b), (0, e.yef)(s, v, b), (0, e.$Tr)(v, u, b), (0, e.yef)(h, v, b), p = !0;
          }, p: function(v, b) {
            d = v;
            var T = {};
            1 & b && (T.content = [d[20], d[21]].join("=")), s.$set(T);
          }, i: function(v) {
            p || ((0, e.Ui)(c.$$.fragment, v), (0, e.Ui)(s.$$.fragment, v), (0, e.Ui)(h.$$.fragment, v), p = !0);
          }, o: function(v) {
            (0, e.etI)(c.$$.fragment, v), (0, e.etI)(s.$$.fragment, v), (0, e.etI)(h.$$.fragment, v), p = !1;
          }, d: function(v) {
            (0, e.vpE)(c, v), v && (0, e.ogt)(o), (0, e.vpE)(s, v), v && (0, e.ogt)(u), (0, e.vpE)(h, v);
          } };
        }
        function As(d) {
          var c, o, s, u;
          return (c = new bt.Z({ props: { name: "cancel" } })).$on("click", d[9]), (s = new bt.Z({ props: { name: "done" } })).$on("click", function() {
            return d[13](d[20]);
          }), { c: function() {
            (0, e.YCL)(c.$$.fragment), o = (0, e.DhX)(), (0, e.YCL)(s.$$.fragment);
          }, m: function(h, p) {
            (0, e.yef)(c, h, p), (0, e.$Tr)(h, o, p), (0, e.yef)(s, h, p), u = !0;
          }, p: function(h, p) {
            d = h;
          }, i: function(h) {
            u || ((0, e.Ui)(c.$$.fragment, h), (0, e.Ui)(s.$$.fragment, h), u = !0);
          }, o: function(h) {
            (0, e.etI)(c.$$.fragment, h), (0, e.etI)(s.$$.fragment, h), u = !1;
          }, d: function(h) {
            (0, e.vpE)(c, h), h && (0, e.ogt)(o), (0, e.vpE)(s, h);
          } };
        }
        function Jr(d) {
          var c, o, s, u, h, p, v;
          function b(N, z) {
            return N[1] === N[23] ? Rs : Ss;
          }
          var T = b(d), k = T(d), B = [As, Cs], M = [];
          function W(N, z) {
            return N[1] === N[23] ? 0 : 1;
          }
          return u = W(d), h = M[u] = B[u](d), { c: function() {
            c = (0, e.bGB)("div"), k.c(), o = (0, e.DhX)(), s = (0, e.bGB)("div"), h.c(), p = (0, e.DhX)(), (0, e.Ljt)(s, "class", "vc-table-col vc-table-col-1 vc-table-action"), (0, e.Ljt)(c, "class", "vc-table-row");
          }, m: function(N, z) {
            (0, e.$Tr)(N, c, z), k.m(c, null), (0, e.R3I)(c, o), (0, e.R3I)(c, s), M[u].m(s, null), (0, e.R3I)(c, p), v = !0;
          }, p: function(N, z) {
            T === (T = b(N)) && k ? k.p(N, z) : (k.d(1), (k = T(N)) && (k.c(), k.m(c, o)));
            var Z = u;
            (u = W(N)) === Z ? M[u].p(N, z) : ((0, e.dvw)(), (0, e.etI)(M[Z], 1, 1, function() {
              M[Z] = null;
            }), (0, e.gbL)(), (h = M[u]) ? h.p(N, z) : (h = M[u] = B[u](N)).c(), (0, e.Ui)(h, 1), h.m(s, null));
          }, i: function(N) {
            v || ((0, e.Ui)(h), v = !0);
          }, o: function(N) {
            (0, e.etI)(h), v = !1;
          }, d: function(N) {
            N && (0, e.ogt)(c), k.d(), M[u].d();
          } };
        }
        function ks(d) {
          for (var c, o, s, u, h = d[0], p = [], v = 0; v < h.length; v += 1)
            p[v] = Jr(Yr(d, h, v));
          var b = function(k) {
            return (0, e.etI)(p[k], 1, 1, function() {
              p[k] = null;
            });
          }, T = null;
          return h.length || (T = Zr()), { c: function() {
            c = (0, e.bGB)("div"), (o = (0, e.bGB)("div")).innerHTML = `<div class="vc-table-col">Key</div>
    <div class="vc-table-col vc-table-col-2">Value</div>
    <div class="vc-table-col vc-table-col-1 vc-table-action"></div>`, s = (0, e.DhX)();
            for (var k = 0; k < p.length; k += 1)
              p[k].c();
            T && T.c(), (0, e.Ljt)(o, "class", "vc-table-row"), (0, e.Ljt)(c, "class", "vc-table");
          }, m: function(k, B) {
            (0, e.$Tr)(k, c, B), (0, e.R3I)(c, o), (0, e.R3I)(c, s);
            for (var M = 0; M < p.length; M += 1)
              p[M].m(c, null);
            T && T.m(c, null), u = !0;
          }, p: function(k, B) {
            var M = B[0];
            if (1007 & M) {
              var W;
              for (h = k[0], W = 0; W < h.length; W += 1) {
                var N = Yr(k, h, W);
                p[W] ? (p[W].p(N, M), (0, e.Ui)(p[W], 1)) : (p[W] = Jr(N), p[W].c(), (0, e.Ui)(p[W], 1), p[W].m(c, null));
              }
              for ((0, e.dvw)(), W = h.length; W < p.length; W += 1)
                b(W);
              (0, e.gbL)(), !h.length && T ? T.p(k, M) : h.length ? T && (T.d(1), T = null) : ((T = Zr()).c(), T.m(c, null));
            }
          }, i: function(k) {
            if (!u) {
              for (var B = 0; B < h.length; B += 1)
                (0, e.Ui)(p[B]);
              u = !0;
            }
          }, o: function(k) {
            p = p.filter(Boolean);
            for (var B = 0; B < p.length; B += 1)
              (0, e.etI)(p[B]);
            u = !1;
          }, d: function(k) {
            k && (0, e.ogt)(c), (0, e.RMB)(p, k), T && T.d();
          } };
        }
        function Is(d, c, o) {
          var s, u = this && this.__awaiter || function(z, Z, oe, ue) {
            return new (oe || (oe = Promise))(function(pe, Ie) {
              function Le(Je) {
                try {
                  qe(ue.next(Je));
                } catch (Re) {
                  Ie(Re);
                }
              }
              function ze(Je) {
                try {
                  qe(ue.throw(Je));
                } catch (Re) {
                  Ie(Re);
                }
              }
              function qe(Je) {
                var Re;
                Je.done ? pe(Je.value) : (Re = Je.value, Re instanceof oe ? Re : new oe(function(Ce) {
                  Ce(Re);
                })).then(Le, ze);
              }
              qe((ue = ue.apply(z, Z || [])).next());
            });
          }, h = ni.getSingleton(ni, "VConsoleStorageModel"), p = At.updateTime;
          (0, e.FIv)(d, p, function(z) {
            return o(10, s = z);
          });
          var v = [], b = -1, T = "", k = "", B = function() {
            o(1, b = -1), o(2, T = ""), o(3, k = "");
          }, M = function(z) {
            return u(void 0, void 0, void 0, at().mark(function Z() {
              return at().wrap(function(oe) {
                for (; ; )
                  switch (oe.prev = oe.next) {
                    case 0:
                      return oe.next = 2, h.removeItem(z);
                    case 2:
                    case "end":
                      return oe.stop();
                  }
              }, Z);
            }));
          }, W = function(z) {
            return u(void 0, void 0, void 0, at().mark(function Z() {
              return at().wrap(function(oe) {
                for (; ; )
                  switch (oe.prev = oe.next) {
                    case 0:
                      if (T === z) {
                        oe.next = 3;
                        break;
                      }
                      return oe.next = 3, h.removeItem(z);
                    case 3:
                      h.setItem(T, k), B();
                    case 5:
                    case "end":
                      return oe.stop();
                  }
              }, Z);
            }));
          }, N = function(z, Z, oe) {
            return u(void 0, void 0, void 0, at().mark(function ue() {
              return at().wrap(function(pe) {
                for (; ; )
                  switch (pe.prev = pe.next) {
                    case 0:
                      o(2, T = z), o(3, k = Z), o(1, b = oe);
                    case 3:
                    case "end":
                      return pe.stop();
                  }
              }, ue);
            }));
          };
          return d.$$.update = function() {
            1024 & d.$$.dirty && s && u(void 0, void 0, void 0, at().mark(function z() {
              return at().wrap(function(Z) {
                for (; ; )
                  switch (Z.prev = Z.next) {
                    case 0:
                      return B(), Z.t0 = o, Z.next = 4, h.getEntries();
                    case 4:
                      Z.t1 = v = Z.sent, (0, Z.t0)(0, Z.t1);
                    case 6:
                    case "end":
                      return Z.stop();
                  }
              }, z);
            }));
          }, [v, b, T, k, p, function(z) {
            return (0, t.id)(z, 1024);
          }, M, W, N, function() {
            B();
          }, s, function() {
            T = this.value, o(2, T);
          }, function() {
            k = this.value, o(3, k);
          }, function(z) {
            return W(z);
          }, function(z) {
            return M(z);
          }, function(z, Z, oe) {
            return N(z, Z, oe);
          }];
        }
        var Ds = function(d) {
          function c(o) {
            var s;
            return s = d.call(this) || this, (0, e.S1n)((0, l.Z)(s), o, Is, ks, e.N8, {}), s;
          }
          return (0, a.Z)(c, d), c;
        }(e.f_C), Os = Ds, Qr = function(d) {
          function c(s, u, h) {
            var p;
            return h === void 0 && (h = {}), (p = d.call(this, s, u, Os, h) || this).model = ni.getSingleton(ni, "VConsoleStorageModel"), p.onAddTopBarCallback = void 0, p;
          }
          (0, a.Z)(c, d);
          var o = c.prototype;
          return o.onReady = function() {
            d.prototype.onReady.call(this), this.onUpdateOption();
          }, o.onShow = function() {
            this.model.refresh();
          }, o.onAddTopBar = function(s) {
            this.onAddTopBarCallback = s, this.updateTopBar();
          }, o.onAddTool = function(s) {
            var u = this;
            s([{ name: "Add", global: !1, onClick: function() {
              u.model.setItem("new_" + Date.now(), "new_value");
            } }, { name: "Refresh", global: !1, onClick: function() {
              u.model.refresh();
            } }, { name: "Clear", global: !1, onClick: function() {
              u.model.clear();
            } }]);
          }, o.onUpdateOption = function() {
            var s, u = (s = this.vConsole.option.storage) == null ? void 0 : s.defaultStorages;
            (0, t.kJ)(u) && (u = u.length > 0 ? u : ["cookies"]) !== (0, Rt.U2)(At.defaultStorages) && (At.defaultStorages.set(u), At.activedName.set(u[0]), this.updateTopBar());
          }, o.updateTopBar = function() {
            var s = this;
            if (typeof this.onAddTopBarCallback == "function") {
              for (var u = (0, Rt.U2)(At.defaultStorages), h = [], p = 0; p < u.length; p++) {
                var v = u[p];
                h.push({ name: v[0].toUpperCase() + v.substring(1), data: { name: v }, actived: v === (0, Rt.U2)(At.activedName), onClick: function(b, T) {
                  var k = (0, Rt.U2)(At.activedName);
                  if (T.name === k)
                    return !1;
                  At.activedName.set(T.name), s.model.refresh();
                } });
              }
              this.onAddTopBarCallback(h);
            }
          }, c;
        }(St), Ut = function() {
          function d(o) {
            var s = this;
            if (this.version = "3.15.1", this.isInited = !1, this.option = {}, this.compInstance = void 0, this.pluginList = {}, this.log = void 0, this.system = void 0, this.network = void 0, d.instance && d.instance instanceof d)
              return console.debug("[vConsole] vConsole is already exists."), d.instance;
            if (d.instance = this, this.isInited = !1, this.option = { defaultPlugins: ["system", "network", "element", "storage"], log: {}, network: {}, storage: {} }, t.Kn(o))
              for (var u in o)
                this.option[u] = o[u];
            this.option.maxLogNumber !== void 0 && (this.option.log.maxLogNumber = this.option.maxLogNumber, console.debug("[vConsole] Deprecated option: `maxLogNumber`, use `log.maxLogNumber` instead.")), this.option.onClearLog !== void 0 && console.debug("[vConsole] Deprecated option: `onClearLog`."), this.option.maxNetworkNumber !== void 0 && (this.option.network.maxNetworkNumber = this.option.maxNetworkNumber, console.debug("[vConsole] Deprecated option: `maxNetworkNumber`, use `network.maxNetworkNumber` instead.")), this._addBuiltInPlugins();
            var h = function() {
              s.isInited || (s._initComponent(), s._autoRun());
            };
            if (document !== void 0)
              document.readyState === "loading" ? r.bind(window, "DOMContentLoaded", h) : h();
            else {
              var p;
              p = setTimeout(function v() {
                document && document.readyState == "complete" ? (p && clearTimeout(p), h()) : p = setTimeout(v, 1);
              }, 1);
            }
          }
          var c = d.prototype;
          return c._addBuiltInPlugins = function() {
            this.addPlugin(new sr("default", "Log"));
            var o = this.option.defaultPlugins, s = { system: { proto: ar, name: "System" } };
            if (s.network = { proto: Ar, name: "Network" }, s.element = { proto: Gr, name: "Element" }, s.storage = { proto: Qr, name: "Storage" }, o && t.kJ(o))
              for (var u = 0; u < o.length; u++) {
                var h = s[o[u]];
                h ? this.addPlugin(new h.proto(o[u], h.name)) : console.debug("[vConsole] Unrecognized default plugin ID:", o[u]);
              }
          }, c._initComponent = function() {
            var o = this;
            if (!r.one("#__vconsole")) {
              var s, u = 1 * t.cF("switch_x"), h = 1 * t.cF("switch_y");
              typeof this.option.target == "string" ? s = document.querySelector(this.option.target) : this.option.target instanceof HTMLElement && (s = this.option.target), s instanceof HTMLElement || (s = document.documentElement), this.compInstance = new en({ target: s, props: { switchButtonPosition: { x: u, y: h } } }), this.compInstance.$on("show", function(p) {
                p.detail.show ? o.show() : o.hide();
              }), this.compInstance.$on("changePanel", function(p) {
                var v = p.detail.pluginId;
                o.showPlugin(v);
              });
            }
            this._updateComponentByOptions();
          }, c._updateComponentByOptions = function() {
            if (this.compInstance) {
              if (this.compInstance.theme !== this.option.theme) {
                var o = this.option.theme;
                o = o !== "light" && o !== "dark" ? "" : o, this.compInstance.theme = o;
              }
              this.compInstance.disableScrolling !== this.option.disableLogScrolling && (this.compInstance.disableScrolling = !!this.option.disableLogScrolling);
            }
          }, c.setSwitchPosition = function(o, s) {
            this.compInstance.switchButtonPosition = { x: o, y: s };
          }, c._autoRun = function() {
            for (var o in this.isInited = !0, this.pluginList)
              this._initPlugin(this.pluginList[o]);
            this._showFirstPluginWhenEmpty(), this.triggerEvent("ready");
          }, c._showFirstPluginWhenEmpty = function() {
            var o = Object.keys(this.pluginList);
            this.compInstance.activedPluginId === "" && o.length > 0 && this.showPlugin(o[0]);
          }, c.triggerEvent = function(o, s) {
            var u = this;
            o = "on" + o.charAt(0).toUpperCase() + o.slice(1), t.mf(this.option[o]) && setTimeout(function() {
              u.option[o].apply(u, s);
            }, 0);
          }, c._initPlugin = function(o) {
            var s = this;
            o.vConsole = this, this.compInstance.pluginList[o.id] = { id: o.id, name: o.name, hasTabPanel: !1, tabOptions: void 0, topbarList: [], toolbarList: [], content: void 0, contentContainer: void 0 }, this.compInstance.pluginList = this._reorderPluginList(this.compInstance.pluginList), o.trigger("init"), o.trigger("renderTab", function(u, h) {
              h === void 0 && (h = {});
              var p = s.compInstance.pluginList[o.id];
              p.hasTabPanel = !0, p.tabOptions = h, u && (s.compInstance.pluginList[o.id].content = u), s.compInstance.pluginList = s.compInstance.pluginList;
            }), o.trigger("addTopBar", function(u) {
              if (u) {
                for (var h = [], p = 0; p < u.length; p++) {
                  var v = u[p];
                  h.push({ name: v.name || "Undefined", className: v.className || "", actived: !!v.actived, data: v.data, onClick: v.onClick });
                }
                s.compInstance.pluginList[o.id].topbarList = h, s.compInstance.pluginList = s.compInstance.pluginList;
              }
            }), o.trigger("addTool", function(u) {
              if (u) {
                for (var h = [], p = 0; p < u.length; p++) {
                  var v = u[p];
                  h.push({ name: v.name || "Undefined", global: !!v.global, data: v.data, onClick: v.onClick });
                }
                s.compInstance.pluginList[o.id].toolbarList = h, s.compInstance.pluginList = s.compInstance.pluginList;
              }
            }), o.isReady = !0, o.trigger("ready");
          }, c._triggerPluginsEvent = function(o) {
            for (var s in this.pluginList)
              this.pluginList[s].isReady && this.pluginList[s].trigger(o);
          }, c._triggerPluginEvent = function(o, s) {
            var u = this.pluginList[o];
            u && u.isReady && u.trigger(s);
          }, c._reorderPluginList = function(o) {
            var s = this;
            if (!t.kJ(this.option.pluginOrder))
              return o;
            for (var u = Object.keys(o).sort(function(v, b) {
              var T = s.option.pluginOrder.indexOf(v), k = s.option.pluginOrder.indexOf(b);
              return T === k ? 0 : T === -1 ? 1 : k === -1 ? -1 : T - k;
            }), h = {}, p = 0; p < u.length; p++)
              h[u[p]] = o[u[p]];
            return h;
          }, c.addPlugin = function(o) {
            return this.pluginList[o.id] !== void 0 ? (console.debug("[vConsole] Plugin `" + o.id + "` has already been added."), !1) : (this.pluginList[o.id] = o, this.isInited && (this._initPlugin(o), this._showFirstPluginWhenEmpty()), !0);
          }, c.removePlugin = function(o) {
            o = (o + "").toLowerCase();
            var s = this.pluginList[o];
            if (s === void 0)
              return console.debug("[vConsole] Plugin `" + o + "` does not exist."), !1;
            s.trigger("remove");
            try {
              delete this.pluginList[o], delete this.compInstance.pluginList[o];
            } catch {
              this.pluginList[o] = void 0, this.compInstance.pluginList[o] = void 0;
            }
            return this.compInstance.pluginList = this.compInstance.pluginList, this.compInstance.activedPluginId == o && (this.compInstance.activedPluginId = "", this._showFirstPluginWhenEmpty()), !0;
          }, c.show = function() {
            this.isInited && (this.compInstance.show = !0, this._triggerPluginsEvent("showConsole"));
          }, c.hide = function() {
            this.isInited && (this.compInstance.show = !1, this._triggerPluginsEvent("hideConsole"));
          }, c.showSwitch = function() {
            this.isInited && (this.compInstance.showSwitchButton = !0);
          }, c.hideSwitch = function() {
            this.isInited && (this.compInstance.showSwitchButton = !1);
          }, c.showPlugin = function(o) {
            this.isInited && (this.pluginList[o] || console.debug("[vConsole] Plugin `" + o + "` does not exist."), this.compInstance.activedPluginId && this._triggerPluginEvent(this.compInstance.activedPluginId, "hide"), this.compInstance.activedPluginId = o, this._triggerPluginEvent(this.compInstance.activedPluginId, "show"));
          }, c.setOption = function(o, s) {
            if (typeof o == "string") {
              for (var u = o.split("."), h = this.option, p = 0; p < u.length; p++) {
                if (u[p] === "__proto__" || u[p] === "constructor" || u[p] === "prototype")
                  return void console.debug("[vConsole] Cannot set `" + u[p] + "` in `vConsole.setOption()`.");
                h[u[p]] === void 0 && (h[u[p]] = {}), p === u.length - 1 && (h[u[p]] = s), h = h[u[p]];
              }
              this._triggerPluginsEvent("updateOption"), this._updateComponentByOptions();
            } else if (t.Kn(o)) {
              for (var v in o)
                v !== "__proto__" && v !== "constructor" && v !== "prototype" ? this.option[v] = o[v] : console.debug("[vConsole] Cannot set `" + v + "` in `vConsole.setOption()`.");
              this._triggerPluginsEvent("updateOption"), this._updateComponentByOptions();
            } else
              console.debug("[vConsole] The first parameter of `vConsole.setOption()` must be a string or an object.");
          }, c.destroy = function() {
            if (this.isInited) {
              this.isInited = !1, d.instance = void 0;
              for (var o = Object.keys(this.pluginList), s = o.length - 1; s >= 0; s--)
                this.removePlugin(o[s]);
              this.compInstance.$destroy();
            }
          }, (0, f.Z)(d, null, [{ key: "instance", get: function() {
            return window.__VCONSOLE_INSTANCE;
          }, set: function(o) {
            o === void 0 || o instanceof d ? window.__VCONSOLE_INSTANCE = o : console.debug("[vConsole] Cannot set `VConsole.instance` because the value is not the instance of VConsole.");
          } }]), d;
        }();
        Ut.VConsolePlugin = void 0, Ut.VConsoleLogPlugin = void 0, Ut.VConsoleDefaultPlugin = void 0, Ut.VConsoleSystemPlugin = void 0, Ut.VConsoleNetworkPlugin = void 0, Ut.VConsoleElementPlugin = void 0, Ut.VConsoleStoragePlugin = void 0, Ut.VConsolePlugin = Pt, Ut.VConsoleLogPlugin = yi, Ut.VConsoleDefaultPlugin = sr, Ut.VConsoleSystemPlugin = ar, Ut.VConsoleNetworkPlugin = Ar, Ut.VConsoleElementPlugin = Gr, Ut.VConsoleStoragePlugin = Qr;
        var Ps = Ut;
      }(), __webpack_exports__ = __webpack_exports__.default, __webpack_exports__;
    }();
  });
})(vconsole_min);
var vconsole_minExports = vconsole_min.exports;
const VConsole = /* @__PURE__ */ getDefaultExportFromCjs(vconsole_minExports), isSupportMse = window.MediaSource && window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'), isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
let playerMap = {
  1: (f) => !isSupportMse || isSafari || f == 1 || f == 2 ? xxPlayer$2 : xxPlayer$3,
  2: xxPlayer$1,
  3: xxPlayer
};
const fun = (f) => {
  console.log("未提供cb", f);
};
console.log("version", "14.6.6");
function cmwwCli(f, t, n) {
  let { token: r, projectId: l, environment: a, host: e } = f, g = isFunction(t) ? t : fun, _ = isFunction(n) ? n : fun;
  commonObj._sign = r, commonObj._projectId = l, commonObj._env = a || "prd", commonObj._url = e || "", requestConf(commonObj._projectId, canTypeVideoWebm(), commonObj._sign, (y, x) => {
    if (y)
      if (x.data && x.code == 200) {
        let { avatarModelType: E } = x.data;
        if (E == 2)
          g(new playerMap[3](f, x));
        else if (E == 3)
          g(new playerMap[2](f, x));
        else {
          const C = playerMap[1](x.data.decodeType);
          g(new C(f, x));
        }
        x.data.showVconsole == 1 && new VConsole({ theme: "dark" });
      } else
        _(x.message);
    else
      _("接口调用失败");
  });
}
const asrClient = asrPlayer;
export {
  asrClient,
  cmwwCli
};
